예제 #1
0
 public function run()
 {
     $group = UserGroup::create(['name' => 'Admins', 'code' => 'admins', 'description' => 'Default group for administrators', 'is_new_user_default' => true]);
     $user = User::create(['email' => static::$email, 'login' => static::$login, 'password' => static::$password, 'password_confirmation' => static::$password, 'first_name' => static::$firstName, 'last_name' => static::$lastName, 'permissions' => ['superuser' => 1], 'is_activated' => true]);
     $user->addGroup($group);
 }
예제 #2
0
 public function run()
 {
     $group = UserGroup::create(['name' => 'Owners', 'code' => UserGroup::DEFAULT_CODE, 'description' => 'Default group for website owners.', 'is_new_user_default' => false]);
     $user = User::create(['email' => static::$email, 'login' => static::$login, 'password' => static::$password, 'password_confirmation' => static::$password, 'first_name' => static::$firstName, 'last_name' => static::$lastName, 'permissions' => ['superuser' => 1], 'is_activated' => true]);
     $user->addGroup($group);
 }
예제 #3
0
 public function run()
 {
     $group = UserGroup::create(['name' => 'Admins']);
     $user = User::create(['email' => static::$email, 'login' => static::$login, 'password' => static::$password, 'password_confirmation' => static::$password, 'first_name' => static::$firstName, 'last_name' => static::$lastName, 'permissions' => ['superuser' => 1], 'is_activated' => true]);
     $user->addGroup($group);
 }