Search by

Declare Laravel Gates and manage per-user permissions and roles.

Package info

github.com/artisan-toolbox/permit

pkg:composer/artisan-toolbox/permit

Fund package maintenance!

artisan-toolbox

Statistics

Installs: 25

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0-beta.3 2026-11-20 23:27 UTC

This package is auto-updated.

Last update: 2026-11-20 23:30:08 UTC


README

Permit

version Packagist PHP Laravel Tests Docs

Laravel authorization package for declaring Gates and managing per-user permissions and roles.

Permit registers declared permissions and roles as Laravel Gates. Its public API is in beta. Check the requirements before installing.

Run these commands from your Laravel application root. The application needs the user table used by its session guard.

composer require 'artisan-toolbox/permit:@beta'
php artisan vendor:publish --tag=permit-migrations
php artisan migrate
php artisan make:permission-group Users

In Laravel Tinker, replace 1 with an existing user's primary key. Grant the ability and verify it through Laravel's Gate.

use App\Models\User;
use ArtisanToolbox\Permit\Facades\Permit;
use Illuminate\Support\Facades\Gate;

$user = User::findOrFail(1);
Permit::add($user, 'users::read');
Gate::forUser($user)->allows('users::read'); // true

See the documentation, installation guide, contribution guide, security policy, changelog, and MIT license.