Good Day Guys .. I am just new to Laravel Events and I just wanna ask if what is the recommended way to use events in controller .. Is it by use of facades or by using Dependency Injection ..
Currently here's my code
use Illuminate\Events\Dispatcher;
public function __construct(Dispatcher $event){
$this->event = $event;
}
$this->event('event.name', $variable);
for now this is working, but is this the right way to fire an event??
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2FL3NvL
via IFTTT
Aucun commentaire:
Enregistrer un commentaire