hasib32 / rest-api-with-lumen

Rest API boilerplate for Lumen micro-framework.
487 stars 143 forks source link

How to call event in new Lumen #63

Open gfernandez-me opened 6 years ago

gfernandez-me commented 6 years ago

In /app/Repositories/EloquentUserRepository.php

The correct use of Event in Laravel/Lumen is:

\Event::fire(new UserCreatedEvent($user));

or

event(new UserCreatedEvent($user));

And my IDE dont know who is \Event in the first case (PhpStorm)