protected function setParameters(Request $request) { $defaultParams = array(); if ($request->source && $request->source->default_parameters) { $defaultParams = Url::paramsToArray($request->source->default_parameters); } $request->parameters = array_merge($_GET, $defaultParams); }
protected function showErrorImage(Request $request) { if ($request->source && $request->source->error_image_url) { response()->httpCode(500); $filename = basename($request->source->error_image_url); $parameters = request()->parameters; if (request()->source->error_image_parameters) { $parameters = array_merge($parameters, Url::paramsToArray(request()->source->error_image_parameters)); } $imageHandler = new NinjaImageHandler($filename); $imageHandler->setParameters($parameters); $imageHandler->load($this->loadRemoteFile(request()->source->error_image_url)); die; } }