Download the PHP package bfe/laravel-permission without Composer
On this page you can find all versions of the php package bfe/laravel-permission. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bfe/laravel-permission
More information about bfe/laravel-permission
Files in bfe/laravel-permission
Package laravel-permission
Short Description Permission handling for Laravel 6.0 and up
License MIT
Homepage https://github.com/spatie/laravel-permission
Informations about the package laravel-permission
Associate users with permissions and roles
Documentation, Installation, and Usage Instructions
To get started with using the package, we'll install it using the following command:
Now that we've installed the package, we'll need to publish the database migration and config file:
We can now run the migrations to create the new tables in our database:
Assuming that we are using the default config values and haven't changed anything in the package's config/permission.php, we should now have five new tables in our database:
What It Does
This package allows you to manage user permissions and roles in a database.
Once installed you can do stuff like this:
Because all permissions will be registered on Laravel's gate, you can check if a user has a permission with Laravel's default can
function:
Testing
All versions of laravel-permission with dependencies
illuminate/auth Version ^7.0|^8.0|^9.0
illuminate/container Version ^7.0|^8.0|^9.0
illuminate/contracts Version ^7.0|^8.0|^9.0
illuminate/database Version ^7.0|^8.0|^9.0