I’m trying to add an event listener to create a custom slug before a model is created or updated (in the backend). However, it seems like my event doesn’t fire. I’ve tried a few different events, but I find the documentation a bit confusing on this point.
public function boot()
{
Event::listen('backend.form.beforeCreate', LinusBostrom\Gasrundan\Observers\RaceSlugObserver::class);
Event::listen('backend.form.beforeUpdate', LinusBostrom\Gasrundan\Observers\RaceSlugObserver::class);
}