2017-12-24 14:17:18 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2017-12-31 04:50:35 +00:00
|
|
|
use App\Models\User;
|
|
|
|
use App\Policies\UserPolicy;
|
2017-12-24 14:17:18 +00:00
|
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The policy mappings for the application.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $policies = [
|
|
|
|
'App\Model' => 'App\Policies\ModelPolicy',
|
2017-12-31 04:50:35 +00:00
|
|
|
User::class => UserPolicy::class,
|
2017-12-24 14:17:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register any authentication / authorization services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
$this->registerPolicies();
|
|
|
|
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|