Open mattglover11 opened 4 years ago
You can extend the facade to make it use dispatch in stead of fire.
<?php
namespace App\Facades;
use Illuminate\Support\Facades\Event as IlluminateEvent;
class Event extends IlluminateEvent
{
public static function fire($var)
{
parent::dispatch($var);
}
}
then in config/app.php you can do
// "Event" => Illuminate\Support\Facades\Event::class,
"Event" => App\Facades\Event::class,
worked for me, but after spending 4 hours trying to make it work and adjust it to my needs I realised I needed some extra options and I could better write a forum myself. What a waste of my time. At least I learned how to extend facades. ;-)
Controllers need to be updated to change the "fire" method to "dispatch" to make it compatible with Laravel 5.8
https://laravel.com/docs/5.8/upgrade#events