From 12033f849b1776488639b0dacc1679892a11302e Mon Sep 17 00:00:00 2001 From: atymic Date: Tue, 2 Apr 2024 10:43:29 +1100 Subject: [PATCH] fix: add laravel 11 docs all providers (#1187) --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 29baf29..ff5e0d9 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,21 @@ Please see the [Base Installation Guide](https://socialiteproviders.com/usage/), ### Add provider event listener +#### Laravel 11+ + +In Laravel 11, the default `EventServiceProvider` provider was removed. Instead, add the listener using the `listen` method on the `Event` facade, in your `AppServiceProvider` `boot` method. + +* Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers. + +```php +Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) { + $event->extendSocialite('autodeskaps', \SocialiteProviders\AutodeskAPS\Provider::class); +}); +``` +
+ +Laravel 10 or below + Configure the package's listener to listen for `SocialiteWasCalled` events. Add the event to your `listen[]` array in `app/Providers/EventServiceProvider`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions. @@ -35,6 +50,7 @@ protected $listen = [ ], ]; ``` +
### Usage