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