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