关于数据库问题

C:\wamp\www\laravel3>php artisan db:seed
**************************************
* Application In Production! *
**************************************

Do you really wish to run this command?

[InvalidArgumentException]
Invalid value [2] for permission [user] given.

db:seed [--class[="..."]] [--database[="..."]] [--force]

我的seeds下有个文件这么写的,不知道怎么错了,请大神看看,内容如下:
class SentrySeeder extends Seeder {

public function run() {

DB::table('users')->delete();
DB::table('groups')->delete();
DB::table('users_groups')->delete();

Sentry::getUserProvider()->create(array(
'email' => 'admin@admin.com',
'password' => "admin",
'first_name' => 'admin',
'last_name' => 'admin',
'activated' => 1,
));

Sentry::getGroupProvider()->create(array(
'name' => 'Admin',
'permissions' => ['admin' => 1],
));

// 将超级用户加入用户组
$adminUser = Sentry::getUserProvider()->findByLogin('admin@admin.com');
$adminGroup = Sentry::getGroupProvider()->findByName('Admin');
$adminUser->addGroup($adminGroup);

Sentry::getUserProvider()->create(array(
'email' => 'user@user.com',
'password' => "user",
'first_name' => 'user',
'last_name' => 'user',
'activated' => 1,
));

Sentry::getGroupProvider()->create(array(
'name' => 'User',
'permissions' => ['user' => 2],
));

// 将普通用户加入用户组用户加入用户组
$adminUser = Sentry::getUserProvider()->findByLogin('user@user.com');
$adminGroup = Sentry::getGroupProvider()->findByName('User');
$adminUser->addGroup($adminGroup);
}
}
我的目的是添加一个超级用户组和一个普通用户组
已邀请:

FiveSay - 成武

赞同来自: jiangs

定义分组权限时,赋予了不可用的值。具体请参考下面的两张图

1.jpg


2.jpg

要回复问题请先登录注册