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

35 lines
770 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 = [
2018-01-15 15:24:11 +00:00
\App\Models\Reply::class => \App\Policies\ReplyPolicy::class,
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',
User::class => UserPolicy::class,
2017-12-24 14:17:18 +00:00
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}