示例#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');
     }
 }