/** * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request * @param \Exception $e * @return \Illuminate\Http\Response */ public function render($request, Exception $e) { $helper = get_helper('Api'); if ($e instanceof ModelNotFoundException) { $model = $e->getModel(); $name = str_replace('\\', '', ucfirst(str_singular(class_basename($model)))); return $helper->responseError(404, $name . ' Not Found', 404); // abort(404); } if ($e instanceof HttpException) { $status = $e->getStatusCode(); return $helper->responseError($status, '', $status); } return parent::render($request, $e); }
</div> </div> </div> <div class="col-md-6"> <div class="panel panel-default"> <div class="panel-heading"> <a href="helper"><i class="fa fa-globe"></i> <?php echo lang('DASHBOARD_last_help'); ?> </a> </div> <div class="panel-body"> <?php get_helper(); ?> </div> </div> </div> </div> </div>
public function __construct() { $this->api = get_helper('Api'); }