PHPackages                             amdadulhaq/guard-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. amdadulhaq/guard-laravel

Abandoned → [amdadulhaq/custodian-laravel](/?search=amdadulhaq%2Fcustodian-laravel)Library[Authentication &amp; Authorization](/categories/authentication)

amdadulhaq/guard-laravel
========================

Guard is a role and permission management system for Laravel

v3.0.0(1mo ago)145.5k2MITPHPPHP ^8.2|^8.3|^8.4|^8.5CI passing

Since Jan 9Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/amdad121/guard-laravel)[ Packagist](https://packagist.org/packages/amdadulhaq/guard-laravel)[ Docs](https://github.com/amdad121/guard-laravel)[ GitHub Sponsors](https://github.com/amdad121)[ RSS](/packages/amdadulhaq-guard-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (36)Versions (37)Used By (0)

Guard - Modern Role &amp; Permission Management for Laravel
===========================================================

[](#guard---modern-role--permission-management-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6d34ab9caf81ed0972f34790b8e097d99e0c67d4cea18db03c4dcc006f6a6305/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616d646164756c6861712f67756172642d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/amdadulhaq/guard-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/ea096c011172fe7385c4aa4128441c80a26e61d4c746710dd3d7d1b03e05c0bd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616d6461643132312f67756172642d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/amdad121/guard-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/196b41641f5e81ec97a8e781f3304af74747061495e0323d9a562571767c8344/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616d6461643132312f67756172642d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/amdad121/guard-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/521142065c8e74fa4e97420fbc92601c522adf4283c28e7703b2f3568a8c18f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616d646164756c6861712f67756172642d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/amdadulhaq/guard-laravel)[![PHP Version](https://camo.githubusercontent.com/b62a93fb4f213eea83a8e52bb4c5461696e4a6b91d7452ce2487abfd70659c7b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/e0a69180f66af7e76bb61e6eaf7e276765598b2d4d509049fa941f5371d5c8c8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253246313225324631332d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://laravel.com)[![Sponsor](https://camo.githubusercontent.com/14cf979f6aac17a907f00ec6d23919aefe3cc74504548b6d1547a7bc27669870/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d2545322539442541342d70696e6b3f7374796c653d666c61742d737175617265266c6f676f3d676974687562)](https://github.com/sponsors/amdad121)

Important

**This package is being renamed to avoid confusion with Laravel's own `Guard`/`Gate` terminology.** Future development moves to **[custodian-laravel](https://github.com/amdad121/custodian-laravel)** — same API, new name. New projects should start there; existing projects on `guard-laravel` keep working and can migrate later.

> A powerful, flexible, and developer-friendly role and permission management system for Laravel applications.

Quick Start
-----------

[](#quick-start)

Get up and running in 5 minutes:

> **Upgrading from an older version?** Check the [Upgrade Guide](UPGRADE.md) for detailed migration instructions.

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require amdadulhaq/guard-laravel
```

### 2. Publish and run migrations

[](#2-publish-and-run-migrations)

```
php artisan vendor:publish --tag="guard-migrations"
php artisan migrate
```

### 3. Setup your User model

[](#3-setup-your-user-model)

```
