$this->replaceRouteParameters($route->uri(), $parameters),
$route
), $parameters);
if (preg_match_all('/{(.*?)}/', $uri, $matchedMissingParameters)) {
throw UrlGenerationException::forMissingParameters($route, $matchedMissingParameters[1]);
}
// Once we have ensured that there are no missing parameters in the URI we will encode
// the URI and prepare it for returning to the developer. If the URI is supposed to
// be absolute, we will return it as-is. Otherwise we will remove the URL's root.
* @throws \Symfony\Component\Routing\Exception\RouteNotFoundException
*/
public function route($name, $parameters = [], $absolute = true)
{
if (! is_null($route = $this->routes->getByName($name))) {
return $this->toRoute($route, $parameters, $absolute);
}
throw new RouteNotFoundException("Route [{$name}] not defined.");
}
if (is_callable($transformer)) {
$transformedData = call_user_func($transformer, $data);
} else {
$transformer->setCurrentScope($this);
$transformedData = $transformer->transform($data);
}
if ($this->transformerHasIncludes($transformer)) {
$includedData = $this->fireIncludedTransformers($transformer, $data);
$transformedData = $this->manager->getSerializer()->mergeIncludes($transformedData, $includedData);
if ($this->resource instanceof Item) {
list($transformedData, $includedData[]) = $this->fireTransformer($transformer, $data);
} elseif ($this->resource instanceof Collection) {
foreach ($data as $value) {
list($transformedData[], $includedData[]) = $this->fireTransformer($transformer, $value);
}
} elseif ($this->resource instanceof NullResource) {
$transformedData = null;
$includedData = [];
} else {
protected function transformCollection( $collection, Transformerable $transformer, $include = null ) {
$resource = new Collection( $collection, $transformer );
if ( $include != null ) {
$this->fractal->parseIncludes( $include );
}
$articles = $this->fractal->createData( $resource )->toArray();
return collect( json_decode( json_encode( $articles['data'] ) ) );
}
protected function createPagedCollection( LengthAwarePaginator $paginator, Transformerable $transformer ) {
});
$arrData['Tags'] = Cache::tags([CacheManager::getTag()])->remember('posts:detail:tag:' . $id, self::CACHE_60MIN, function () use ($article) {
$result = $article->tags()->get();
return $this->transformCollection($result, new TagTransformer);
});
$arrData['Blog_Content_Related'] = Cache::tags([CacheManager::getTag()])->remember('posts:detail:related:' . $id, self::CACHE_60MIN, function () use ($article) {
$articles = $article->blog_related()->with(['category'])->published()->where('status', Blog::STATUS_PUBLISHED)->orderBy('id', 'desc')->limit(wn_setting('limit_related_post',3))->with([
$arrData['Tags'] = Cache::tags([CacheManager::getTag()])->remember('posts:detail:tag:' . $id, self::CACHE_60MIN, function () use ($article) {
$result = $article->tags()->get();
return $this->transformCollection($result, new TagTransformer);
});
$arrData['Blog_Content_Related'] = Cache::tags([CacheManager::getTag()])->remember('posts:detail:related:' . $id, self::CACHE_60MIN, function () use ($article) {
$articles = $article->blog_related()->with(['category'])->published()->where('status', Blog::STATUS_PUBLISHED)->orderBy('id', 'desc')->limit(wn_setting('limit_related_post',3))->with([
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
if ($this->manager->shouldBlock() ||
($request->route() instanceof Route && $request->route()->locksFor())) {
return $this->handleRequestWhileBlocking($request, $session, $next);
} else {
return $this->handleStatefulRequest($request, $session, $next);
}
}
/**
* Handle the given request within session state.
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
if (!empty($oRedirect['url_target']) && $oRedirect['url_target'] != $path) {
return redirect($oRedirect['url_target'], $oRedirect['http_code']);
}
return $next($request);
}
public function getUrlRedirect($url_source)
{
return SEOUrlRedirect::where('url_source', $url_source)->where('active', 1)->first();
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
public function handle(Request $request, Closure $next)
{
$request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests
$this->setTrustedProxyIpAddresses($request);
return $next($request);
}
/**
* Sets the trusted proxies on the request to the value of trustedproxy.proxies
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
UrlGenerationException |
---|
Illuminate\Routing\Exceptions\UrlGenerationException: Missing required parameter for [Route: tag] [URI: tag/{key}.html] [Missing parameter: key]. at /homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Exceptions/UrlGenerationException.php:35 at Illuminate\Routing\Exceptions\UrlGenerationException::forMissingParameters() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php:91) at Illuminate\Routing\RouteUrlGenerator->to() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:451) at Illuminate\Routing\UrlGenerator->toRoute() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:426) at Illuminate\Routing\UrlGenerator->route() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:708) at route() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/Modules/Blog/Entities/BlogTag.php:43) at Modules\Blog\Entities\BlogTag->getLink() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/Themes/WebBlog/Transformers/TagTransformer.php:16) at Themes\WebBlog\Transformers\TagTransformer->transform() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/league/fractal/src/Scope.php:419) at League\Fractal\Scope->fireTransformer() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/league/fractal/src/Scope.php:361) at League\Fractal\Scope->executeResourceTransformers() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/league/fractal/src/Scope.php:235) at League\Fractal\Scope->toArray() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/Themes/WebBlog/Traits/TransformerTrait.php:20) at Themes\WebBlog\Http\Controllers\WebBlogController->transformCollection() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/Themes/WebBlog/Http/Controllers/WebBlogController.php:250) at Themes\WebBlog\Http\Controllers\WebBlogController->Themes\WebBlog\Http\Controllers\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:385) at Illuminate\Cache\Repository->remember() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/Themes/WebBlog/Http/Controllers/WebBlogController.php:251) at Themes\WebBlog\Http\Controllers\WebBlogController->blogDetail() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54) at Illuminate\Routing\Controller->callAction() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45) at Illuminate\Routing\ControllerDispatcher->dispatch() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php:254) at Illuminate\Routing\Route->runController() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php:197) at Illuminate\Routing\Route->run() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:693) at Illuminate\Routing\Router->Illuminate\Routing\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/app/Http/Middleware/CacheWithVarnish.php:11) at App\Http\Middleware\CacheWithVarnish->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41) at Illuminate\Routing\Middleware\SubstituteBindings->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49) at Illuminate\View\Middleware\ShareErrorsFromSession->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php:39) at Illuminate\Session\Middleware\AuthenticateSession->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121) at Illuminate\Session\Middleware\StartSession->handleStatefulRequest() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63) at Illuminate\Session\Middleware\StartSession->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37) at Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:67) at Illuminate\Cookie\Middleware\EncryptCookies->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103) at Illuminate\Pipeline\Pipeline->then() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:695) at Illuminate\Routing\Router->runRouteWithinStack() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:670) at Illuminate\Routing\Router->runRoute() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:636) at Illuminate\Routing\Router->dispatchToRoute() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:625) at Illuminate\Routing\Router->dispatch() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:166) at Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/Modules/System/Http/Middleware/RedirectRequests.php:34) at Modules\System\Http\Middleware\RedirectRequests->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27) at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:86) at Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/fruitcake/laravel-cors/src/HandleCors.php:57) at Fruitcake\Cors\HandleCors->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/fideloper/proxy/src/TrustProxies.php:57) at Fideloper\Proxy\TrustProxies->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103) at Illuminate\Pipeline\Pipeline->then() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:141) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:110) at Illuminate\Foundation\Http\Kernel->handle() (/homesun/tdttvn/domains/tieudungtiepthi.vn/public_html/public/index.php:52) |