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

Laravel Acl Laravel Package

islamrumon/laravel-acl

Laravel ACL provides database-backed roles, groups, and permissions for Laravel 5.8+. Note: unmaintained since Jan 2024; consider spatie/laravel-permission instead.

View on GitHub
Deep Wiki
Context7

title: Working with guards weight: 6

When you are using custom guards in your application, they act like namespaces for your permissions and groups. Every guard has its own permissions that can be assigned to their user model. The downside of this is that when working with multiple guards, because this package requires you to register a permission name for each guard you want to authenticate with, you would have to define the same permission multiple times for each guard that you are using.

Creating permissions with multiple guards

When you create a new permission or group, the first defined guard in config/auth.php on guards config array will be used.

To check if a user has permission for a specific guard, you can pass the guard as second parameter to the hasPermission method:

$user->hasPermission('create posts', 'api');

When determining if a given group or permission is valid for a given model, it checks against the first matching guard in this order:

  • guardName() method if it exists on the model;
  • $guard_name property if it exists on the model;
  • The first defined guard/provider combination in config/auth.php in guards key that matches the logged-in user's guard;
  • The config/auth.php on defaults.guard config;
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.
jayeshmepani/jpl-moshier-ephemeris-php
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