コード例 #1
0
ファイル: UserRepository.php プロジェクト: rajabishek/begin
 /**
  * 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;
 }