2015-12-13 04:42:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2015-12-14 16:27:26 +00:00
|
|
|
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\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The policy mappings for the application.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $policies = [
|
2015-12-14 16:27:26 +00:00
|
|
|
Playlist::class => PlaylistPolicy::class,
|
|
|
|
User::class => UserPolicy::class,
|
2015-12-13 04:42:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register any application authentication / authorization services.
|
|
|
|
*/
|
2016-09-26 06:30:00 +00:00
|
|
|
public function boot()
|
2015-12-13 04:42:28 +00:00
|
|
|
{
|
2016-09-26 06:30:00 +00:00
|
|
|
$this->registerPolicies();
|
2015-12-13 04:42:28 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|