2019-11-16 20:37:33 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2019-11-30 18:19:13 +01:00
|
|
|
use App\Models\User;
|
|
|
|
use App\Policies\UserPolicy;
|
2019-11-16 20:37:33 +01:00
|
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The policy mappings for the application.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $policies = [
|
2019-11-30 18:19:13 +01:00
|
|
|
'App\Model' => 'App\Policies\ModelPolicy',
|
|
|
|
User::class => UserPolicy::class,
|
2019-11-16 20:37:33 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register any authentication / authorization services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
$this->registerPolicies();
|
|
|
|
}
|
|
|
|
}
|