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 = [
|
2018-01-01 04:00:45 +00:00
|
|
|
\App\Models\Topic::class => \App\Policies\TopicPolicy::class,
|
2017-12-24 14:17:18 +00:00
|
|
|
'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();
|
|
|
|
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|