morphMany(ReportStep::class, ReportStep::ATTRIBUTE_ACTIONABLE); } /** * Bootstrap the model. * * @return void */ // protected static function boot(): void // { // parent::boot(); // static::creating(function (BaseModel $model) { // if (Gate::forUser(Auth::user())->check('create', $model)) { // return; // } // ReportAction::makeReport(ReportAction::makeForCreate($model::class, $model->attributesToArray())); // return false; // }); // static::deleting(function (BaseModel $model) { // if (Gate::forUser(Auth::user())->check('delete', $model)) { // return; // } // ReportAction::makeReport(ReportAction::makeForDelete($model)); // return false; // }); // static::updating(function (BaseModel $model) { // if (Gate::forUser(Auth::user())->check('update', $model)) { // return; // } // ReportAction::makeReport(ReportAction::makeForUpdate($model, $model->attributesToArray())); // return false; // }); // } }