Open binaryfire opened 3 months ago
namespace App\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
use \SocialiteProviders\Steam\Provider as SteamProvider;
use \SocialiteProviders\Discord\Provider as DiscordProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
$event->extendSocialite('steam',SteamProvider::class);
$event->extendSocialite('discord',DiscordProvider::class);
});
//
}
}
Working fine.
Is Event::listen
backwards compatible with older versions? If so, we can just update the docs to cover that.
@M4TSKI Thanks! My point was that wasn't documented anywhere. I've never seen that syntax before.
@atymic Thanks for updating the docs.
Hi guys
I've just started a new Laravel 11 project and there's no longer an
EventServiceProvider
. What's the best way to useSocialiteWasCalled[]
now? The current format doesn't work insideEvent::listen()
.Thanks!