Skip to content

Commit 0a5e9f8

Browse files
committed
Update README.md
1 parent 27c643c commit 0a5e9f8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ Almost everything can be swapped out in Bartender.
140140
If you would like to handle everything yourself for OAuth redirects and callbacks, you may create your own `ProviderHandler`:
141141

142142
```php
143+
// app/Socialite/UserProviderHandler.php
144+
143145
namespace App\Socialite;
144146

145147
use Illuminate\Http\Request;
@@ -183,6 +185,8 @@ Then, provide it into the second argument in the `Bartender::serve` method:
183185
```php
184186
// app/Providers/AuthServiceProvider.php
185187

188+
namespace App\Providers;
189+
186190
use App\Socialite\UserProviderHandler;
187191
use DirectoryTree\Bartender\Facades\Bartender;
188192

@@ -204,6 +208,8 @@ If you would like to customize the creation of the user in the default
204208
handler, you may create your own `ProviderRepository` implementation:
205209

206210
```php
211+
// app/Socialite/UserProviderRepository.php
212+
207213
namespace App\Socialite;
208214

209215
use App\Models\User;
@@ -238,6 +244,8 @@ class UserProviderRepository implements ProviderRepository
238244
Then, bind your implementation in the service container in your `AppServiceProvider`:
239245

240246
```php
247+
// app/Providers/AppServiceProvider.php
248+
241249
namespace App\Providers;
242250

243251
use App\Socialite\UserProviderRepository;
@@ -261,6 +269,8 @@ redirector and flash messages depending on the outcome of a OAuth callback,
261269
you can create your own `ProviderRedirector` implementation:
262270

263271
```php
272+
// app/Socialite/UserProviderRedirector.php
273+
264274
namespace App\Socialite;
265275

266276
class UserProviderRedirector implements ProviderRedirector
@@ -304,6 +314,8 @@ class UserProviderRedirector implements ProviderRedirector
304314
Then, bind your implementation in the service container in your `AppServiceProvider`:
305315

306316
```php
317+
// app/Providers/AppServiceProvider.php
318+
307319
namespace App\Providers;
308320

309321
use App\Socialite\UserProviderRedirector;

0 commit comments

Comments
 (0)