Пример #1
0
 /**
  * Find the user by the given id.
  *
  * @param  int  $id
  * @return \Begin\User
  */
 public function findById($id)
 {
     $user = $this->model->find($id);
     if (is_null($user)) {
         throw new UserNotFoundException("The user with id as {$id} does not exist.");
     }
     return $user;
 }