PHPackages                             larapacks/authorization - 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. larapacks/authorization

ActiveProject[Authentication &amp; Authorization](/categories/authentication)

larapacks/authorization
=======================

Native Laravel Authorization.

v2.3.2(5y ago)5410.7k↓50%132MITPHPPHP &gt;=7.0CI failing

Since May 4Pushed 4y ago3 watchersCompare

[ Source](https://github.com/larapacks/authorization)[ Packagist](https://packagist.org/packages/larapacks/authorization)[ RSS](/packages/larapacks-authorization/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (17)Used By (2)

Authorization
=============

[](#authorization)

[![Build Status](https://camo.githubusercontent.com/7a40ac3a0423e9a370ed4bdf38516961f6ceea276078a3d5ccc28502720ddf50/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6c6172617061636b732f617574686f72697a6174696f6e2f72756e2d74657374732e7376673f7374796c653d666c61742d737175617265)](https://github.com/larapacks/authorization/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/aff724b09cee1c7bf5011c2d74f17ac0aa66ce28614b6bd20f95121c36ca6e16/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c6172617061636b732f617574686f72697a6174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/larapacks/authorization/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/19c203aa8e05aecfb8802d122b437ff3eed3e37673eeac91586d5b232d62b9e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172617061636b732f617574686f72697a6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/larapacks/authorization)[![Latest Stable Version](https://camo.githubusercontent.com/7ae3b82d9e5d86337c3433ac44ddf62fc6e99a28867392e9463ef90e0b64363c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172617061636b732f617574686f72697a6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/larapacks/authorization)[![License](https://camo.githubusercontent.com/795817c6796ce7386e7c43fe2beaab291dd002811b91bb58db003db0acdd13ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6172617061636b732f617574686f72697a6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/larapacks/authorization)

An easy, native role / permission management system for Laravel.

🚨 Repository Has Moved 🚨
------------------------

[](#-repository-has-moved-)

This repository has been moved to: [DirectoryTree/Authorization](https://github.com/DirectoryTree/Authorization).

Index
-----

[](#index)

- [Installation](#installation)
    - [Migration Customization](#migration-customization)
    - [Model Customization](#model-customization)
- [Usage](#usage)
- [Checking Permissions &amp; Roles](#checking-permissions--roles)
- [Caching](#caching)
- [Gate Registration](#gate-registration)
- [Middleware](#middleware)
- [Testing](#running-tests)

Installation
------------

[](#installation)

> **Note**: Laravel 5.5 or greater is required.

To get started, install Authorization via the Composer package manager:

```
composer require larapacks/authorization

```

The Authorization service provider registers its own database migration directory with the framework, so you should migrate your database after installing the package. The Authorization migrations will create the tables your application needs to store roles and permissions:

```
php artisan migrate

```

Now insert the `Larapacks\Authorization\Traits\Authorizable` onto your `App\Models\User` model:

```
