예제 #1
0
 /**
  * Finds the Solicitation model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Solicitation the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Solicitation::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('A pagina solicitada não existe ou você não possui permissão para visualizar!');
     }
 }