koel/app/Providers/AuthServiceProvider.php

38 lines
847 B
PHP
Raw Normal View History

2015-12-13 04:42:28 +00:00
<?php
namespace App\Providers;
use App\Models\Playlist;
use App\Models\User;
use App\Policies\PlaylistPolicy;
use App\Policies\UserPolicy;
2015-12-13 04:42:28 +00:00
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
Playlist::class => PlaylistPolicy::class,
User::class => UserPolicy::class,
2015-12-13 04:42:28 +00:00
];
/**
* Register any application authentication / authorization services.
*
2015-12-14 13:22:39 +00:00
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
*
2015-12-13 04:42:28 +00:00
* @return void
*/
public function boot(GateContract $gate)
{
$this->registerPolicies($gate);
//
}
}