Ejemplo n.º 1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire(Userbot $userbot, ApiMonkey $api)
 {
     $user = User::create(['char_id' => $this->argument('char_id'), 'char_name' => $api->getCharName($this->argument('char_id')), 'email' => $this->argument('email'), 'password' => Userbot::generatePassword(16), 'next_check' => \Carbon\Carbon::now('UTC')]);
     $userbot->updateSingle($user->char_id);
     $userbot->linkSlackMembers();
     $user->save();
     $this->info('User created and API work done.');
 }
Ejemplo n.º 2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }
Ejemplo n.º 3
0
 /**
  * @param array $charArray
  *
  * @return User
  */
 public static function createAndFill($charArray)
 {
     $user = User::create($charArray);
     $userbot = new Userbot();
     $userbot->updateSingle($charArray['char_id']);
     return $user;
 }