1<?php
2
3namespace App\Providers;
4
5use App\Post;
6use App\Policies\PostPolicy;
7use Illuminate\Support\Facades\Gate;
8use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
9
10class AuthServiceProvider extends ServiceProvider
11{
12 /**
13 * The policy mappings for the application.
14 *
15 * @var array
16 */
17 protected $policies = [
18 Post::class => PostPolicy::class,
19 ];
20
21 /**
22 * Register any application authentication / authorization services.
23 *
24 * @return void
25 */
26 public function boot()
27 {
28 $this->registerPolicies();
29
30 //
31 }
32}