agmar/role

There is no license information available for the latest version (1.0.7) of this package.

Role-Permision package based on codecourse tutorial

1.0.7 2017-04-12 14:51 UTC

This package is not auto-updated.

Last update: 2024-05-20 13:28:00 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;
}