agmar / role
Role-Permision package based on codecourse tutorial
Installs: 32
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/agmar/role
Requires
- php: >=5.6.4
- illuminate/database: ~5.0
- illuminate/support: ~5.2
This package is not auto-updated.
Last update: 2025-10-20 21:03:10 UTC
README
Download package using:
composer require agmar/role
copy migrations from vendor/agmar/role/migrations to migrations folder in your application folder run laravel migration
register the service provider:
Agmar\Role\AgmarRoleServiceProvider::class,
register the middleware in App\Http\Kernel.php:
'role'=>\Agmar\Role\Middleware\RoleMiddleware::class,
Add hasPermissionsTrait to your User model:
use Agmar\Role\Permissions\hasPermissionsTrait;
...and use it inside the user model
class User extends Authenticatable
{
use hasPermissionsTrait;
}