コード例 #1
0
 /**
  * @param  $id
  * @throws GeneralException
  * @return Question|null
  */
 public function findOrThrowException($id)
 {
     $question = Question::find($id);
     if (!is_null($question)) {
         return $question;
     }
     throw new GeneralException(trans('exceptions.backend.quiz.questions.not_found'));
 }