You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Alpha 1 and 2 I'm using an Event Listener in app/Listeners/PreventDeletingMounts.php. This Listener prevents users from deleting pages that have a mounted collection on them.
namespaceApp\Listeners;
useStatamic\Events\EntryDeleting;
useStatamic\Facades\Collection;
class PreventDeletingMounts
{
/** * Handle the event. */publicfunctionhandle(EntryDeleting$event): void
{
if (Collection::findByMount($event->entry)) {
thrownew \Exception(trans('strings.collection_mounted', ['title' => $event->entry['title']]));
}
}
}
In Laravel 10 I had to register this in my EventServiceProvider but in Laravel 11 it's supposed to auto-discover those listeners.
It seems in my case this isn't happening. The listener isn't triggering, nor is it listed when running php artisan event:list.
Bug description
In Alpha 1 and 2 I'm using an Event Listener in
app/Listeners/PreventDeletingMounts.php
. This Listener prevents users from deleting pages that have a mounted collection on them.In Laravel 10 I had to register this in my
EventServiceProvider
but in Laravel 11 it's supposed to auto-discover those listeners.It seems in my case this isn't happening. The listener isn't triggering, nor is it listed when running
php artisan event:list
.How to reproduce
php artisan event:list
Logs
No response
Environment
Installation
Starter Kit using via CLI
Antlers Parser
None
Additional details
No response
The text was updated successfully, but these errors were encountered: