Symfony\Component\HttpKernel\Exception\NotFoundHttpException {#211 -statusCode: 404 -headers: [] }
* @throws \Symfony\Component\HttpKernel\Exception\HttpException */ public function abort($code, $message = '', array $headers = []) { if ($code == 404) { throw new NotFoundHttpException($message); } throw new HttpException($code, $message, null, $headers); } * @throws \Symfony\Component\HttpKernel\Exception\HttpException * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ function abort($code, $message = '', array $headers = []) { app()->abort($code, $message, $headers); }}if (! function_exists('app')) { /**$router->get('/{page}', function ($page) use ($router) { if (view()->exists($page)) { return view($page); } abort(404);}); if (static::isCallableWithAtSign($callback) || $defaultMethod) { return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** * Call a string reference to a class using Class@method syntax. * @param mixed ...$args * @return mixed */ public static function unwrapIfClosure($value, ...$args) { return $value instanceof Closure ? $value(...$args) : $value; } /** * Get the class name of the given parameter's type, if possible. * * @return mixed */ protected static function callBoundMethod($container, $callback, $default) { if (! is_array($callback)) { return Util::unwrapIfClosure($default); } // Here we need to turn the array callable into a Class@method string we can use to // examine the container and see if there are any method bindings for this given // method. If there are, we can call this method binding callback immediately. if (static::isCallableWithAtSign($callback) || $defaultMethod) { return static::callClass($container, $callback, $parameters, $defaultMethod); } return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) { return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters))); }); } /** $this->buildStack[] = $className; $pushedToBuildStack = true; } $result = BoundMethod::call($this, $callback, $parameters, $defaultMethod); if ($pushedToBuildStack) { array_pop($this->buildStack); } if (! isset($callable)) { throw new RuntimeException('Unable to resolve route handler.'); } try { return $this->prepareResponse($this->call($callable, $routeInfo[2])); } catch (HttpResponseException $e) { return $e->getResponse(); } } return $this->callActionOnArrayBasedRoute($this['request']->route()); })); } return $this->prepareResponse( $this->callActionOnArrayBasedRoute($routeInfo) ); } /** * Call the Closure or invokable on the array based route. case Dispatcher::NOT_FOUND: throw new NotFoundHttpException; case Dispatcher::METHOD_NOT_ALLOWED: throw new MethodNotAllowedHttpException($routeInfo[1]); case Dispatcher::FOUND: return $this->handleFoundRoute($routeInfo); } } /** * Handle a route found by the dispatcher. if (isset($this->router->getRoutes()[$method.$pathInfo])) { return $this->handleFoundRoute([true, $this->router->getRoutes()[$method.$pathInfo]['action'], []]); } return $this->handleDispatcherResponse( $this->createDispatcher()->dispatch($method, $pathInfo) ); }); } catch (Throwable $e) { return $this->prepareResponse($this->sendExceptionToHandler($e)); ->send($this->make('request')) ->through($middleware) ->then($then); } return $then($this->make('request')); } /** * Prepare the response for sending. * [$method, $pathInfo] = $this->parseIncomingRequest($request); try { $this->boot(); return $this->sendThroughPipeline($this->middleware, function ($request) use ($method, $pathInfo) { $this->instance(Request::class, $request); if (isset($this->router->getRoutes()[$method.$pathInfo])) { return $this->handleFoundRoute([true, $this->router->getRoutes()[$method.$pathInfo]['action'], []]); } * @param \Symfony\Component\HttpFoundation\Request|null $request * @return void */ public function run($request = null) { $response = $this->dispatch($request); if ($response instanceof SymfonyResponse) { $response->send(); } else { echo (string) $response;*/$app->run();|
NotFoundHttpException
|
|---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException:
at /home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php:31
at Laravel\Lumen\Application->abort(404, '', array())
(/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/helpers.php:24)
at abort(404)
(/home1/smartgas/public_html/routes/web.php:287)
at Closure->{closure}('services')
(/home1/smartgas/public_html/vendor/illuminate/container/BoundMethod.php:36)
at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
(/home1/smartgas/public_html/vendor/illuminate/container/Util.php:41)
at Illuminate\Container\Util::unwrapIfClosure(object(Closure))
(/home1/smartgas/public_html/vendor/illuminate/container/BoundMethod.php:81)
at Illuminate\Container\BoundMethod::callBoundMethod(object(Application), object(Closure), object(Closure))
(/home1/smartgas/public_html/vendor/illuminate/container/BoundMethod.php:35)
at Illuminate\Container\BoundMethod::call(object(Application), object(Closure), array('page' => 'services'), null)
(/home1/smartgas/public_html/vendor/illuminate/container/Container.php:662)
at Illuminate\Container\Container->call(object(Closure), array('page' => 'services'))
(/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:304)
at Laravel\Lumen\Application->callActionOnArrayBasedRoute(array(1, array(object(Closure)), array('page' => 'services')))
(/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:269)
at Laravel\Lumen\Application->handleFoundRoute(array(1, array(object(Closure)), array('page' => 'services')))
(/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:239)
at Laravel\Lumen\Application->handleDispatcherResponse(array(1, array(object(Closure)), array('page' => 'services')))
(/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:174)
at Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(object(Request))
(/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:431)
at Laravel\Lumen\Application->sendThroughPipeline(array(), object(Closure))
(/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:167)
at Laravel\Lumen\Application->dispatch(null)
(/home1/smartgas/public_html/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php:112)
at Laravel\Lumen\Application->run()
(/home1/smartgas/public_html/public/index.php:56)
|