Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laratrust Laravel Package

santigarcor/laratrust

Laratrust adds role and permission management to Laravel with support for multiple user models, teams, guards, caching, events, middleware, gates/policies, and an optional admin panel for managing roles and permissions.

View on GitHub
Deep Wiki
Context7

Installation

  1. You can install the package using composer:
composer require santigarcor/laratrust
  1. Publish the configuration file:
php artisan vendor:publish --tag="laratrust"

::: warning If this command did not publish any files, chances are, the Laratrust service provider hasn't been registered. Try clearing your configuration cache

php artisan config:clear

:::

  1. Run the setup command:

::: tip IMPORTANT Before running the command go to your config/laratrust.php file and change the values according to your needs. :::

php artisan laratrust:setup

This command will generate the migrations, create the Role and Permission models (if you are using the teams feature it will also create a Team model) and will add the trait to the configured user models.

  1. Dump the autoloader:
composer dump-autoload
  1. Run the migrations:
php artisan migrate

::: tip IMPORTANT If you did the steps above you are done with the configuration, if not, please read and follow the whole configuration process :::

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium