* If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Establecimiento the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findEstablecimiento($id) { if (($model = Establecimiento::findOne(['seo_permalink' => $id, 'activo' => Establecimiento::OP_STATUS_ACTIVO_VAL])) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } } }
$_GET = [ 'establecimiento_id' => 'd\'-almendra-keto-bakery', ];