if (count($segments) !== 2) {
throw new InvalidArgumentException("View [{$name}] has an invalid name.");
}
if (! isset($this->hints[$segments[0]])) {
throw new InvalidArgumentException("No hint path defined for [{$segments[0]}].");
}
return $segments;
}
* @param string $name
* @return string
*/
protected function findNamespacedView($name)
{
[$namespace, $view] = $this->parseNamespaceSegments($name);
return $this->findInPaths($view, $this->hints[$namespace]);
}
/**
if (isset($this->views[$name])) {
return $this->views[$name];
}
if ($this->hasHintInformation($name = trim($name))) {
return $this->views[$name] = $this->findNamespacedView($name);
}
return $this->views[$name] = $this->findInPaths($name, $this->paths);
}
* @param array $mergeData
* @return \Illuminate\Contracts\View\View
*/
public function make($view, $data = [], $mergeData = [])
{
$path = $this->finder->find(
$view = $this->normalizeName($view)
);
// Next, we will create the view instance and call the view creator for the view
// which can set any data, etc. Then we will return the view instance back to
{
$flattenException = $this->bladeMapper->map(
$this->htmlErrorRenderer->render($throwable),
);
return $this->viewFactory->make('laravel-exceptions-renderer::show', [
'exception' => new Exception($flattenException, $request, $this->listener, $this->basePath),
])->render();
}
/**
try {
if (config('app.debug')) {
if (app()->has(ExceptionRenderer::class)) {
return $this->renderExceptionWithCustomRenderer($e);
} elseif ($this->container->bound(Renderer::class)) {
return $this->container->make(Renderer::class)->render(request(), $e);
}
}
return $this->renderExceptionWithSymfony($e, config('app.debug'));
} catch (Throwable $e) {
* @return \Symfony\Component\HttpFoundation\Response
*/
protected function convertExceptionToResponse(Throwable $e)
{
return new SymfonyResponse(
$this->renderExceptionContent($e),
$this->isHttpException($e) ? $e->getStatusCode() : 500,
$this->isHttpException($e) ? $e->getHeaders() : []
);
}
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
*/
protected function prepareResponse($request, Throwable $e)
{
if (! $this->isHttpException($e) && config('app.debug')) {
return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e)->prepare($request);
}
if (! $this->isHttpException($e)) {
$e = new HttpException(500, $e->getMessage(), $e);
}
*/
protected function renderExceptionResponse($request, Throwable $e)
{
return $this->shouldReturnJson($request, $e)
? $this->prepareJsonResponse($request, $e)
: $this->prepareResponse($request, $e);
}
/**
* Convert an authentication exception into a response.
*
return $this->finalizeRenderedResponse($request, match (true) {
$e instanceof HttpResponseException => $e->getResponse(),
$e instanceof AuthenticationException => $this->unauthenticated($request, $e),
$e instanceof ValidationException => $this->convertValidationExceptionToResponse($e, $request),
default => $this->renderExceptionResponse($request, $e),
}, $e);
}
/**
* Prepare the final, rendered response to be returned to the browser.
// PC向けテンプレートを返す
return response()->view('errors.404', [], 404);
}
}
return parent::render($request, $e);
}
}
$handler = $this->container->make(ExceptionHandler::class);
$handler->report($e);
$response = $handler->render($passable, $e);
if (is_object($response) && method_exists($response, 'withException')) {
$response->withException($e);
}
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
/**
}
throw $exception;
}
return $next($request);
}
}
// 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);
$this->isReading($request) ||
$this->runningUnitTests() ||
$this->inExceptArray($request) ||
$this->tokensMatch($request)
) {
return tap($next($request), function ($response) use ($request) {
if ($this->shouldAddXsrfTokenCookie()) {
$this->addCookieToResponse($request, $response);
}
});
}
// 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);
// Putting the errors in the view for every view allows the developer to just
// assume that some errors are always available, which is convenient since
// they don't have to continually run checks for the presence of errors.
return $next($request);
}
}
// 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);
$this->startSession($request, $session)
);
$this->collectGarbage($session);
$response = $next($request);
$this->storeCurrentUrl($request, $session);
$this->addCookieToResponse($response, $session);
if ($this->manager->shouldBlock() ||
($request->route() instanceof Route && $request->route()->locksFor())) {
return $this->handleRequestWhileBlocking($request, $session, $next);
}
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);
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$response = $next($request);
foreach ($this->cookies->getQueuedCookies() as $cookie) {
$response->headers->setCookie($cookie);
}
// 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);
* @param \Closure $next
* @return \Symfony\Component\HttpFoundation\Response
*/
public function handle($request, Closure $next)
{
return $this->encrypt($next($this->decrypt($request)));
}
/**
* Decrypt the cookies on the request.
*
// 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);
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
return $pipeline($this->passable);
}
/**
* Run the pipeline and return the result.
*
$middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
return (new Pipeline($this->container))
->send($request)
->through($middleware)
->then(fn ($request) => $this->prepareResponse(
$request, $route->run()
));
}
/**
$request->setRouteResolver(fn () => $route);
$this->events->dispatch(new RouteMatched($route, $request));
return $this->prepareResponse($request,
$this->runRouteWithinStack($route, $request)
);
}
/**
* Run the given route within a Stack "onion" instance.
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function dispatchToRoute(Request $request)
{
return $this->runRoute($request, $this->findRoute($request));
}
/**
* Find the route matching a given request.
*
*/
public function dispatch(Request $request)
{
$this->currentRequest = $request;
return $this->dispatchToRoute($request);
}
/**
* Dispatch the request to a route and return the response.
*
protected function dispatchToRouter()
{
return function ($request) {
$this->app->instance('request', $request);
return $this->router->dispatch($request);
};
}
/**
* Call the terminate method on any terminable middleware.
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
* @return mixed
*/
public function handle($request, Closure $next)
{
if (!$this->debugbar->isEnabled() || $this->inExceptArray($request)) {
return $next($request);
}
$this->debugbar->boot();
try {
// 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);
//View設定の読込
$this->setViewSetting();
return $next($this->request);
}
private function setViewSetting(){
$template = $this->sitestatus->getTemplate();
// 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);
{
$request::setTrustedProxies([], $this->getTrustedHeaderNames());
$this->setTrustedProxyIpAddresses($request);
return $next($request);
}
/**
* Sets the trusted proxies on the request.
*
// 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, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
// 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->isBlockIp($this->ip,$bip)){
//ブロック処理
$this->blockAction();
}
}
return $next($request);
}
/*
* HTTP_X_FORWARDED_FOR があれば $_SERVER['REMOTE_ADDR'] 上書き
*/
// 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, Closure $next)
{
return $next($request);
}
}
// 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);
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
return $pipeline($this->passable);
}
/**
* Run the pipeline and return the result.
*
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
$this->requestStartedAt = Carbon::now();
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
*/
public function handleRequest(Request $request)
{
$kernel = $this->make(HttpKernelContract::class);
$response = $kernel->handle($request)->send();
$kernel->terminate($request, $response);
}
/**
// Register the Composer autoloader...
require __DIR__.'/../vendor/autoload.php';
// Bootstrap Laravel and handle the request...
(require_once __DIR__.'/../bootstrap/app.php')
->handleRequest(Request::capture());
InvalidArgumentException
|
---|
InvalidArgumentException: No hint path defined for [laravel-exceptions-renderer]. at /var/www/html/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php:112 at Illuminate\View\FileViewFinder->parseNamespaceSegments() (/var/www/html/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php:90) at Illuminate\View\FileViewFinder->findNamespacedView() (/var/www/html/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php:76) at Illuminate\View\FileViewFinder->find() (/var/www/html/vendor/laravel/framework/src/Illuminate/View/Factory.php:151) at Illuminate\View\Factory->make() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php:92) at Illuminate\Foundation\Exceptions\Renderer\Renderer->render() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:845) at Illuminate\Foundation\Exceptions\Handler->renderExceptionContent() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:826) at Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:805) at Illuminate\Foundation\Exceptions\Handler->prepareResponse() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:704) at Illuminate\Foundation\Exceptions\Handler->renderExceptionResponse() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:592) at Illuminate\Foundation\Exceptions\Handler->render() (/var/www/html/app/Exceptions/Handler.php:67) at App\Exceptions\Handler->render() (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:51) at Illuminate\Routing\Pipeline->handleException() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:146) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:51) at Illuminate\Routing\Middleware\SubstituteBindings->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:88) at Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49) at Illuminate\View\Middleware\ShareErrorsFromSession->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121) at Illuminate\Session\Middleware\StartSession->handleStatefulRequest() (/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64) at Illuminate\Session\Middleware\StartSession->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37) at Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:75) at Illuminate\Cookie\Middleware\EncryptCookies->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:119) at Illuminate\Pipeline\Pipeline->then() (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:807) at Illuminate\Routing\Router->runRouteWithinStack() (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:786) at Illuminate\Routing\Router->runRoute() (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:750) at Illuminate\Routing\Router->dispatchToRoute() (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:739) at Illuminate\Routing\Router->dispatch() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:201) at Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:144) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:59) at Barryvdh\Debugbar\Middleware\InjectDebugbar->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/app/Http/Middleware/ViewSwitchMiddleware.php:61) at App\Http\Middleware\ViewSwitchMiddleware->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php:58) at Illuminate\Http\Middleware\TrustProxies->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:51) at Illuminate\Foundation\Http\Middleware\TrimStrings->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/app/Http/Middleware/BlockIp.php:88) at App\Http\Middleware\BlockIp->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/app/Http/Middleware/DomainCheck.php:44) at App\Http\Middleware\DomainCheck->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:119) at Illuminate\Pipeline\Pipeline->then() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:145) at Illuminate\Foundation\Http\Kernel->handle() (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1188) at Illuminate\Foundation\Application->handleRequest() (/var/www/html/public/index.php:17) |