app/Providers/EventServiceProvider.php
/**
     * Register any events for your application.
     *
     * @return void
     */
Register any events for your application.
@return void
Register any events for your application . @return void
public function boot()
    {
        parent::boot();
        Ticket::created(function($ticket){
            event(new TicketsEvent($ticket,'created'));
        });
    }
public function boot ( ) { parent :: boot ( ) ; Ticket :: created ( function ( $ ticket ) { event ( new TicketsEvent ( $ ticket , 'created' ) ) ; } ) ; }
Register any events for your application.
Register any events for your application .