This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\Models\Post; | |
use App\Policies\PostPolicy; | |
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; | |
use Illuminate\Support\Facades\Gate; | |
class AuthServiceProvider extends ServiceProvider | |
{ | |
/** | |
* The application’s policy mappings. | |
* | |
* @var array | |
*/ | |
protected $policies = [ | |
Post::class => PostPolicy::class, | |
]; | |
/** | |
* Register all authorization and authentication services. | |
*/ | |
public function boot(): void | |
{ | |
// … | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment