Bristol SU Support Package
PassportServiceProvider.php
Go to the documentation of this file.
1 <?php
2 
3 
5 
6 
13 use Laravel\Passport\PassportServiceProvider as ServiceProvider;
14 
22 class PassportServiceProvider extends ServiceProvider
23 {
24 
31  protected function deleteCookieOnLogout()
32  {
33  Event::listen(Logout::class, function($event) {
34  if (Request::hasCookie(Passport::cookie()) && $event->user instanceof User) {
35  Cookie::queue(Cookie::forget(Passport::cookie()));
36  }
37  });
38  }
39 
40 }