AuthServiceProvider.php 886 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Providers;
  3. use App\Http\Middleware\Authenticate;
  4. use Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests;
  5. use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
  6. use Illuminate\Support\Facades\Gate;
  7. class AuthServiceProvider extends ServiceProvider
  8. {
  9. /**
  10. * The policy mappings for the application.
  11. *
  12. * @var array
  13. */
  14. protected $policies = [
  15. // 'App\Model' => 'App\Policies\ModelPolicy',
  16. ];
  17. /**
  18. * Register any application services.
  19. *
  20. * @return void
  21. */
  22. public function register()
  23. {
  24. $this->app->bind(AuthenticatesRequests::class, Authenticate::class);
  25. }
  26. /**
  27. * Register any authentication / authorization services.
  28. *
  29. * @return void
  30. */
  31. public function boot()
  32. {
  33. $this->registerPolicies();
  34. //
  35. }
  36. }