AuthServiceProvider.php 641B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Providers;
  3. use App\Models\User;
  4. use App\Policies\UserPolicy;
  5. use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
  6. class AuthServiceProvider extends ServiceProvider
  7. {
  8. /**
  9. * The policy mappings for the application.
  10. *
  11. * @var array<class-string, class-string>
  12. */
  13. protected $policies = [
  14. // Class::class => ClassPolicy::class,
  15. User::class => UserPolicy::class
  16. ];
  17. /**
  18. * Register any authentication / authorization services.
  19. *
  20. * @return void
  21. */
  22. public function boot()
  23. {
  24. $this->registerPolicies();
  25. }
  26. }