l5b-crud
l5b-crud copied to clipboard
Something is out of sync between the events and the listener
My model is named Genre.
The events wind up referring to the plural:
$this->genres = $genres;
but the GenreEventListener uses the singular
$newitem = $event->genre->name;
This causes an error. Changing one or the other so that they match makes things work.
Given that it's an event for for a single entity, I would guess that the event code should use the singular instead of the plural.