/**
  * Handle the command
  *
  * @param $command
  * @return User
  */
 public function Handle($command)
 {
     $user = User::where('email', $command->email)->firstOrFail();
     User::updatePassword($user->id, $command->password);
     User::login($user->username, $command->password);
     $this->dispatchEventsFor($user);
     return $user;
 }
 private function tableSeed()
 {
     $allUsers = User::all();
     $adminUsers = User::where('username', 'LIKE', '%2%')->get();
     $staffUsers = User::where('username', 'NOT LIKE', '%2%')->get();
     foreach ($adminUsers as $user) {
         $user->roles()->sync([Role::whereName('admin')->first()->id]);
     }
     foreach ($staffUsers as $user) {
         $user->roles()->sync([Role::whereName('staff')->first()->id]);
     }
     foreach ($allUsers as $user) {
         $user->roles()->attach(Role::whereName('user')->first()->id);
     }
 }