AuthServiceProvider.php 758 B

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