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: Team permissions weight: 4

To enable team permissions, you MUST change the teams key to true in config/acl.php:

'teams' => true,

To use custom foreign key name for teams you must change the team_foreign_key in the same configuration file:

'team_foreign_key => 'custom_fk_name',

To start using teams, you must implement a way to select the user team on authentication. Then, you can set the global team_id from anywhere, but I recommend you to create a middleware:

namespace App\Http\Middleware;

use Closure;

class TeamsPermissionMiddleware
{    
    public function handle($request, Closure $next){
        if(! empty(auth()->user())){
            setPermissionsTeamId('team id'); // You should get the team id from where you set on authentication.
        }
  
        return $next($request);
    }
}

Team groups and permissions

The group and permissions assignment process for teams are the same as for users, but it uses the global team_id set on login.

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.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
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