Exemple #1
0
 /**
  * Render the given HttpException.
  *
  * @param  \Symfony\Component\HttpKernel\Exception\HttpException  $e
  * @return \Symfony\Component\HttpFoundation\Response
  */
 protected function renderHttpException(HttpException $e)
 {
     $status = $e->getStatusCode();
     if (view()->exists("public::errors.{$status}")) {
         $theme = Theme::uses('public')->layout('error');
         return $theme->of("public::errors.{$status}", ['exception' => $e])->render();
     } else {
         return $this->convertExceptionToResponse($e);
     }
 }
Exemple #2
0
 /**
  * Get translated url.
  *
  * @param string $url
  *
  * @return string
  */
 function theme_asset($file)
 {
     return Theme::asset()->url($file);
 }