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;
}