/** * @param ConfigureModelDefaultAttributes $event */ public function approveByDefault(ConfigureModelDefaultAttributes $event) { if ($event->isModel(Post::class)) { $event->attributes['is_approved'] = true; } }
/** * @param ConfigureModelDefaultAttributes $event */ public function approveByDefault(ConfigureModelDefaultAttributes $event) { if ($event->isModel(Post::class)) { $event->attributes['is_approved'] = true; } }