$basePath = '', $shouldCache = true, $compiledExtension = 'php') { if (! $cachePath) { throw new InvalidArgumentException('Please provide a valid cache path.'); } $this->files = $files; $this->cachePath = $cachePath; $this->basePath = $basePath; * @return void */ public function registerBladeCompiler() { $this->app->singleton('blade.compiler', function ($app) { return tap(new BladeCompiler( $app['files'], $app['config']['view.compiled'], $app['config']->get('view.relative_hash', false) ? $app->basePath() : '', $app['config']->get('view.cache', true), $app['config']->get('view.compiled_extension', 'php'), // used as resolvers for more fine-tuned resolution of these objects. if ($concrete instanceof Closure) { $this->buildStack[] = spl_object_hash($concrete); try { return $concrete($this, $this->getLastParameterOverride()); } finally { array_pop($this->buildStack); } } // We're ready to instantiate an instance of the concrete type registered for // the binding. This will instantiate the types, as well as resolve any of // its "nested" dependencies recursively until all have gotten resolved. $object = $this->isBuildable($concrete, $abstract) ? $this->build($concrete) : $this->make($concrete); // If we defined any extenders for this type, we'll need to spin through them // and apply them to the object being built. This allows for the extension // of services, such as changing configuration or decorating the object. */ protected function resolve($abstract, $parameters = [], $raiseEvents = true) { $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract)); return parent::resolve($abstract, $parameters, $raiseEvents); } /** * Load the deferred provider if the given type is a deferred service and the instance has not been loaded. * * * @throws \Illuminate\Contracts\Container\BindingResolutionException */ public function make($abstract, array $parameters = []) { return $this->resolve($abstract, $parameters); } /** * {@inheritdoc} * */ public function make($abstract, array $parameters = []) { $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract)); return parent::make($abstract, $parameters); } /** * Resolve the given type from the container. * protected function resolveClass(ReflectionParameter $parameter) { try { return $parameter->isVariadic() ? $this->resolveVariadicClass($parameter) : $this->make(Util::getParameterClassName($parameter)); } // If we can not resolve the class instance, we will check to see if the value // is optional, and if it is we will return the optional parameter value as // the value of the dependency, similarly to how we do this with scalars. // If the class is null, it means the dependency is a string or some other // primitive type which we can not resolve since it is not a class and // we will just bomb out with an error since we have no-where to go. $result ??= is_null(Util::getParameterClassName($dependency)) ? $this->resolvePrimitive($dependency) : $this->resolveClass($dependency); $this->fireAfterResolvingAttributeCallbacks($dependency->getAttributes(), $result); if ($dependency->isVariadic()) { $results = array_merge($results, $result); // Once we have all the constructor's parameters we can create each of the // dependency instances and then use the reflection instances to make a // new instance of this class, injecting the created dependencies in. try { $instances = $this->resolveDependencies($dependencies); } catch (BindingResolutionException $e) { array_pop($this->buildStack); throw $e; } // We're ready to instantiate an instance of the concrete type registered for // the binding. This will instantiate the types, as well as resolve any of // its "nested" dependencies recursively until all have gotten resolved. $object = $this->isBuildable($concrete, $abstract) ? $this->build($concrete) : $this->make($concrete); // If we defined any extenders for this type, we'll need to spin through them // and apply them to the object being built. This allows for the extension // of services, such as changing configuration or decorating the object. */ protected function resolve($abstract, $parameters = [], $raiseEvents = true) { $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract)); return parent::resolve($abstract, $parameters, $raiseEvents); } /** * Load the deferred provider if the given type is a deferred service and the instance has not been loaded. * * * @throws \Illuminate\Contracts\Container\BindingResolutionException */ public function make($abstract, array $parameters = []) { return $this->resolve($abstract, $parameters); } /** * {@inheritdoc} * */ public function make($abstract, array $parameters = []) { $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract)); return parent::make($abstract, $parameters); } /** * Resolve the given type from the container. * return new Renderer( $app->make(Factory::class), $app->make(Listener::class), $errorRenderer, $app->make(BladeMapper::class), $app->basePath(), ); }); $this->app->singleton(Listener::class); // used as resolvers for more fine-tuned resolution of these objects. if ($concrete instanceof Closure) { $this->buildStack[] = spl_object_hash($concrete); try { return $concrete($this, $this->getLastParameterOverride()); } finally { array_pop($this->buildStack); } } // We're ready to instantiate an instance of the concrete type registered for // the binding. This will instantiate the types, as well as resolve any of // its "nested" dependencies recursively until all have gotten resolved. $object = $this->isBuildable($concrete, $abstract) ? $this->build($concrete) : $this->make($concrete); // If we defined any extenders for this type, we'll need to spin through them // and apply them to the object being built. This allows for the extension // of services, such as changing configuration or decorating the object. */ protected function resolve($abstract, $parameters = [], $raiseEvents = true) { $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract)); return parent::resolve($abstract, $parameters, $raiseEvents); } /** * Load the deferred provider if the given type is a deferred service and the instance has not been loaded. * * * @throws \Illuminate\Contracts\Container\BindingResolutionException */ public function make($abstract, array $parameters = []) { return $this->resolve($abstract, $parameters); } /** * {@inheritdoc} * */ public function make($abstract, array $parameters = []) { $this->loadDeferredProviderIfNeeded($abstract = $this->getAlias($abstract)); return parent::make($abstract, $parameters); } /** * Resolve the given type from the container. * 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. * @param \Throwable $e * @return void */ protected function renderHttpResponse(Throwable $e) { $this->getExceptionHandler()->render(static::$app['request'], $e)->send(); } /** * Handle the PHP shutdown event. * if ($exceptionHandlerFailed ?? false) { exit(1); } } else { $this->renderHttpResponse($e); } } /** * Render an exception to the console. * @return callable */ protected function forwardsTo($method) { return fn (...$arguments) => static::$app ? $this->{$method}(...$arguments) : false; } /** * Determine if the error level is a deprecation.|
InvalidArgumentException
|
|---|
InvalidArgumentException:
Please provide a valid cache path.
at /home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php:67
at Illuminate\View\Compilers\Compiler->__construct(object(Filesystem), false, '', true, 'php')
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php:97)
at Illuminate\View\ViewServiceProvider->Illuminate\View\{closure}(object(Application), array())
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:931)
at Illuminate\Container\Container->build(object(Closure))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:815)
at Illuminate\Container\Container->resolve('blade.compiler', array(), true)
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1046)
at Illuminate\Foundation\Application->resolve('blade.compiler', array())
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:751)
at Illuminate\Container\Container->make('blade.compiler', array())
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1028)
at Illuminate\Foundation\Application->make('blade.compiler')
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:1112)
at Illuminate\Container\Container->resolveClass(object(ReflectionParameter))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:1022)
at Illuminate\Container\Container->resolveDependencies(array(object(ReflectionParameter), object(ReflectionParameter)))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:973)
at Illuminate\Container\Container->build('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper')
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:815)
at Illuminate\Container\Container->resolve('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper', array(), true)
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1046)
at Illuminate\Foundation\Application->resolve('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper', array())
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:751)
at Illuminate\Container\Container->make('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper', array())
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1028)
at Illuminate\Foundation\Application->make('Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper')
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php:257)
at Illuminate\Foundation\Providers\FoundationServiceProvider->Illuminate\Foundation\Providers\{closure}(object(Application), array())
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:931)
at Illuminate\Container\Container->build(object(Closure))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:815)
at Illuminate\Container\Container->resolve('Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer', array(), true)
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1046)
at Illuminate\Foundation\Application->resolve('Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer', array())
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Container/Container.php:751)
at Illuminate\Container\Container->make('Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer', array())
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1028)
at Illuminate\Foundation\Application->make('Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer')
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:845)
at Illuminate\Foundation\Exceptions\Handler->renderExceptionContent(object(PhonePeException))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:826)
at Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse(object(PhonePeException))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:805)
at Illuminate\Foundation\Exceptions\Handler->prepareResponse(object(Request), object(PhonePeException))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:704)
at Illuminate\Foundation\Exceptions\Handler->renderExceptionResponse(object(Request), object(PhonePeException))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:592)
at Illuminate\Foundation\Exceptions\Handler->render(object(Request), object(PhonePeException))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:219)
at Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse(object(PhonePeException))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:196)
at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(object(PhonePeException))
(/home5/w3wcom/lw/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:256)
at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(object(PhonePeException))
|