Hello! I have a problem with Laravel 5.1.
When I try to do things like this, with facades
Event::fire(new SomeEvent());
It works great
But when I try to inject Event class in constructor like this
public function __construct(Illuminate\Events\Dispatcher $event)
{
$this->event = $event;
....
}
public function handle()
{
$this->event->fire(new SomeEvent());
....
}
It do not works, so I can't write a unit tests.. What I do wrong?
Thanks
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community