laravel-learn-bbs/app/Providers/AuthServiceProvider.php

33 lines
630 B
PHP
Raw Normal View History

2017-12-24 14:17:18 +00:00
<?php
namespace App\Providers;
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',
User::class => UserPolicy::class,
2017-12-24 14:17:18 +00:00
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}