41 lines
1003 B
PHP
41 lines
1003 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Content\Content;
|
|
use App\Models\FileManager\File;
|
|
use App\Models\Module;
|
|
use App\Models\User;
|
|
use App\Policies\ContentPolicy;
|
|
use App\Policies\FilesPolicy;
|
|
use App\Policies\ModulePolicy;
|
|
use App\Policies\UserPolicy;
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as IlluminateAuthServiceProvider;
|
|
|
|
class AuthServiceProvider extends IlluminateAuthServiceProvider
|
|
{
|
|
/**
|
|
* The policy mappings for the application.
|
|
* @var array
|
|
*/
|
|
protected $policies = [
|
|
Content::class => ContentPolicy::class,
|
|
User::class => UserPolicy::class,
|
|
Module::class => ModulePolicy::class,
|
|
File::class => FilesPolicy::class,
|
|
];
|
|
|
|
/**
|
|
* Register any application authentication / authorization services.
|
|
*
|
|
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
$this->registerPolicies();
|
|
//
|
|
}
|
|
}
|