예제 #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $email = $this->argument('email');
     try {
         $user = User::whereEmail($email)->firstOrFail();
         $user->delete();
         $this->info('User deleted.');
     } catch (ModelNotFoundException $e) {
         $this->error('Did not find a user with the given email address');
     }
 }
예제 #2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param array $data
  *
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }