Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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