Closed leo-unglaub closed 1 month ago
That will dispatch an event with the name MyCreatedAction
. Instead do something like:
protected static function booted()
{
static::created(function (self $foobar) {
MyCreatedAction::run($foobar);
});
}
to simply run the action.
@leo-unglaub @lorisleiva This issue could be closed
Closing due to inactivity. If you feel your issue is still relevant please open a new one with a link to a repository containing a minimal reproducible example.
Hey, the
asListener
method is not called when the action is registered in the model file itself:The
__construct
method is called on both actions, but not theasListener
or thehandle
method. Any ideas why? Is this a bug or a feature?Thanks Leo