Open leo-unglaub opened 2 years 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
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