25 lines
592 B
PHP
25 lines
592 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Category;
|
|
use App\Models\Post;
|
|
use App\Models\Comment;
|
|
use App\Policies\CategoryPolicy;
|
|
use App\Policies\PostPolicy;
|
|
use App\Policies\CommentPolicy;
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
{
|
|
protected $policies = [
|
|
Post::class => PostPolicy::class,
|
|
Comment::class => CommentPolicy::class,
|
|
Category::class => CategoryPolicy::class,
|
|
];
|
|
|
|
public function boot(): void
|
|
{
|
|
$this->registerPolicies();
|
|
}
|
|
}
|