entrust 安装

详情见github的加粗文字
Zizaco/entrust

Concepts

Let's start by creating the following Roles and Permissions:

$owner = new Role();
$owner->name = 'owner';
$owner->display_name = 'Project Owner'; // optional
$owner->description = 'User is the owner of a given project'; // optional
$owner->save();

$admin = new Role();
$admin->name = 'admin';
$admin->display_name = 'User Administrator'; // optional
$admin->description = 'User is allowed to manage and edit other users'; // optional
$admin->save();

这个角色是在怎么建啊?
已邀请:

jack

赞同来自:

在命令窗口执行:php artisan tinker
这样就可以执行上面的php代码了。有可能出现找不到类,需先use 命名空间

要回复问题请先登录注册