Skip to content

Commit

Permalink
[add]PostPolicyをAuthServiceProviderへ設定
Browse files Browse the repository at this point in the history
  • Loading branch information
inaka-phper committed Sep 9, 2015
1 parent 15b50a2 commit ff69c85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions laravel/app/Providers/AuthServiceProvider.php
Expand Up @@ -2,6 +2,8 @@

namespace App\Providers;

use App\Policies\PostPolicy;
use App\Post;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;

Expand All @@ -14,6 +16,7 @@ class AuthServiceProvider extends ServiceProvider
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
Post::class => PostPolicy::class,
];

/**
Expand Down

0 comments on commit ff69c85

Please sign in to comment.