Symfony Exception

PDOException QueryException ViewException

HTTP 500 Internal Server Error

SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server. (Connection: sqlsrv, SQL: select * from [service_translations] where [service_translations].[service_id] = 11 and [service_translations].[service_id] is not null) (View: /home/dwg-germany.de/dwg/resources/views/livewire/home.blade.php)

Exceptions 3

Illuminate\View\ ViewException

Show exception properties
Illuminate\View\ViewException {#1322
  #severity: E_ERROR
}
  1. throw new UniqueConstraintViolationException(
  2. $this->getName(), $query, $this->prepareBindings($bindings), $e
  3. );
  4. }
  5. throw new QueryException(
  6. $this->getName(), $query, $this->prepareBindings($bindings), $e
  7. );
  8. }
  9. }
  1. \Illuminate\View\Engines\PhpEngine::handleViewException($e, $obLevel);
  2. return;
  3. }
  4. parent::handleViewException($e, $obLevel);
  5. }
  6. public function shouldBypassExceptionForLivewire(\Throwable $e, $obLevel)
  7. {
  8. $uses = array_flip(class_uses_recursive($e));
  1. \Closure::bind(function () use ($__path, $__data) {
  2. extract($__data, EXTR_SKIP);
  3. include $__path;
  4. }, $component, $component)();
  5. } catch (\Exception|\Throwable $e) {
  6. $this->handleViewException($e, $obLevel);
  7. }
  8. return ltrim(ob_get_clean());
  9. }
  1. // Once we have the path to the compiled file, we will evaluate the paths with
  2. // typical PHP just like any other templates. We also keep a stack of views
  3. // which have been rendered for right exception messages to be generated.
  4. try {
  5. $results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6. } catch (ViewException $e) {
  7. if (! Str::of($e->getMessage())->contains(['No such file or directory', 'File does not exist at path'])) {
  8. throw $e;
  9. }
  1. $currentComponent = ExtendBlade::currentRendering();
  2. trigger('view:compile', $currentComponent, $path);
  3. return parent::get($path, $data);
  4. }
  5. protected function evaluatePath($__path, $__data)
  6. {
  7. if (! ExtendBlade::isRenderingLivewireComponent()) {
  1. *
  2. * @return string
  3. */
  4. protected function getContents()
  5. {
  6. return $this->engine->get($this->path, $this->gatherData());
  7. }
  8. /**
  9. * Get the data bound to the view instance.
  10. *
  1. // clear out the sections for any separate views that may be rendered.
  2. $this->factory->incrementRender();
  3. $this->factory->callComposer($this);
  4. $contents = $this->getContents();
  5. // Once we've finished rendering the view, we'll decrement the render count
  6. // so that each section gets flushed out next time a view is created and
  7. // no old sections are staying around in the memory of an environment.
  8. $this->factory->decrementRender();
  1. * @throws \Throwable
  2. */
  3. public function render(?callable $callback = null)
  4. {
  5. try {
  6. $contents = $this->renderContents();
  7. $response = isset($callback) ? $callback($this, $contents) : null;
  8. // Once we have the contents of the view, we will flush the sections if we are
  9. // done rendering all views so that there is nothing left hanging over when
  1. $revertA = Utils::shareWithViews('__livewire', $component);
  2. $revertB = Utils::shareWithViews('_instance', $component); // @deprecated
  3. $viewContext = new ViewContext;
  4. $html = $view->render(function ($view) use ($viewContext) {
  5. // Extract leftover slots, sections, and pushes before they get flushed...
  6. $viewContext->extractFromEnvironment($view->getFactory());
  7. });
  8. $revertA(); $revertB();
  1. protected function trackInRenderStack($component, $callback)
  2. {
  3. array_push(static::$renderStack, $component);
  4. return tap($callback(), function () {
  5. array_pop(static::$renderStack);
  6. });
  7. }
  8. protected function updateProperties($component, $updates, $data, $context)
  1. ]);
  2. }
  3. [ $view, $properties ] = $this->getView($component);
  4. return $this->trackInRenderStack($component, function () use ($component, $view, $properties) {
  5. $finish = trigger('render', $component, $view, $properties);
  6. $revertA = Utils::shareWithViews('__livewire', $component);
  7. $revertB = Utils::shareWithViews('_instance', $component); // @deprecated
  1. if (config('app.debug')) $start = microtime(true);
  2. $finish = trigger('mount', $component, $params, $key, $parent);
  3. if (config('app.debug')) trigger('profile', 'mount', $component->getId(), [$start, microtime(true)]);
  4. if (config('app.debug')) $start = microtime(true);
  5. $html = $this->render($component, '<div></div>');
  6. if (config('app.debug')) trigger('profile', 'render', $component->getId(), [$start, microtime(true)]);
  7. if (config('app.debug')) $start = microtime(true);
  8. trigger('dehydrate', $component, $context);
  1. return app(ComponentRegistry::class)->resolveMissingComponent($resolver);
  2. }
  3. function mount($name, $params = [], $key = null)
  4. {
  5. return app(HandleComponents::class)->mount($name, $params, $key);
  6. }
  7. function snapshot($component, $context = null)
  8. {
  9. return app(HandleComponents::class)->snapshot($component, $context);
  1. $html = null;
  2. $layoutConfig = SupportPageComponents::interceptTheRenderOfTheComponentAndRetreiveTheLayoutConfiguration(function () use (&$html) {
  3. $params = SupportPageComponents::gatherMountMethodParamsFromRouteParameters($this);
  4. $html = app('livewire')->mount($this::class, $params);
  5. });
  6. $layoutConfig = $layoutConfig ?: new PageComponentConfig;
  7. $layoutConfig->normalizeViewNameAndParamsForBladeComponents();
  1. });
  2. on('render', $handler);
  3. on('render.placeholder', $handler);
  4. $callback();
  5. off('render', $handler);
  6. off('render.placeholder', $handler);
  7. return $layoutConfig;
in /home/dwg-germany.de/dwg/vendor/livewire/livewire/src/Features/SupportPageComponents/HandlesPageComponents.php :: interceptTheRenderOfTheComponentAndRetreiveTheLayoutConfiguration (line 14)
  1. // Here's we're hooking into the "__invoke" method being called on a component.
  2. // This way, users can pass Livewire components into Routes as if they were
  3. // simple invokable controllers. Ex: Route::get('...', SomeLivewireComponent::class);
  4. $html = null;
  5. $layoutConfig = SupportPageComponents::interceptTheRenderOfTheComponentAndRetreiveTheLayoutConfiguration(function () use (&$html) {
  6. $params = SupportPageComponents::gatherMountMethodParamsFromRouteParameters($this);
  7. $html = app('livewire')->mount($this::class, $params);
  8. });
  1. if (method_exists($controller, 'callAction')) {
  2. return $controller->callAction($method, $parameters);
  3. }
  4. return $controller->{$method}(...array_values($parameters));
  5. }
  6. /**
  7. * Resolve the parameters for the controller.
  8. *
  1. *
  2. * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  3. */
  4. protected function runController()
  5. {
  6. return $this->controllerDispatcher()->dispatch(
  7. $this, $this->getController(), $this->getControllerMethod()
  8. );
  9. }
  10. /**
  1. {
  2. $this->container = $this->container ?: new Container;
  3. try {
  4. if ($this->isControllerAction()) {
  5. return $this->runController();
  6. }
  7. return $this->runCallable();
  8. } catch (HttpResponseException $e) {
  9. return $e->getResponse();
  1. return (new Pipeline($this->container))
  2. ->send($request)
  3. ->through($middleware)
  4. ->then(fn ($request) => $this->prepareResponse(
  5. $request, $route->run()
  6. ));
  7. }
  8. /**
  9. * Gather the middleware for the given route with resolved class names.
  1. */
  2. protected function prepareDestination(Closure $destination)
  3. {
  4. return function ($passable) use ($destination) {
  5. try {
  6. return $destination($passable);
  7. } catch (Throwable $e) {
  8. return $this->handleException($passable, $e);
  9. }
  10. };
  11. }
Pipeline->Illuminate\Pipeline\{closure}() in /home/dwg-germany.de/dwg/app/Http/Middleware/Shared.php (line 25)
  1. $footer_header=PageContent::whereIN('page', ['footer','header'])
  2. ->where('locale', app()->getLocale())
  3. ->pluck('value', 'key')
  4. ->toArray();
  5. View::share('footer_header', $footer_header);
  6. return $next($request);
  7. }
  8. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
Pipeline->Illuminate\Pipeline\{closure}() in /home/dwg-germany.de/dwg/app/Http/Middleware/SetLocale.php (line 24)
  1. App::setLocale($locale);
  2. // dd(0);
  3. // return redirect($locale . '/' . $request->path());
  4. }
  5. return $next($request);
  6. }
  7. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. }
  2. throw $exception;
  3. }
  4. return $next($request);
  5. }
  6. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. $this->isReading($request) ||
  2. $this->runningUnitTests() ||
  3. $this->inExceptArray($request) ||
  4. $this->tokensMatch($request)
  5. ) {
  6. return tap($next($request), function ($response) use ($request) {
  7. if ($this->shouldAddXsrfTokenCookie()) {
  8. $this->addCookieToResponse($request, $response);
  9. }
  10. });
  11. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. // Putting the errors in the view for every view allows the developer to just
  2. // assume that some errors are always available, which is convenient since
  3. // they don't have to continually run checks for the presence of errors.
  4. return $next($request);
  5. }
  6. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. $this->startSession($request, $session)
  2. );
  3. $this->collectGarbage($session);
  4. $response = $next($request);
  5. $this->storeCurrentUrl($request, $session);
  6. $this->addCookieToResponse($response, $session);
  1. if ($this->manager->shouldBlock() ||
  2. ($request->route() instanceof Route && $request->route()->locksFor())) {
  3. return $this->handleRequestWhileBlocking($request, $session, $next);
  4. }
  5. return $this->handleStatefulRequest($request, $session, $next);
  6. }
  7. /**
  8. * Handle the given request within session state.
  9. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. * @param \Closure $next
  2. * @return mixed
  3. */
  4. public function handle($request, Closure $next)
  5. {
  6. $response = $next($request);
  7. foreach ($this->cookies->getQueuedCookies() as $cookie) {
  8. $response->headers->setCookie($cookie);
  9. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. * @param \Closure $next
  2. * @return \Symfony\Component\HttpFoundation\Response
  3. */
  4. public function handle($request, Closure $next)
  5. {
  6. return $this->encrypt($next($this->decrypt($request)));
  7. }
  8. /**
  9. * Decrypt the cookies on the request.
  10. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. $pipeline = array_reduce(
  2. array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  3. );
  4. try {
  5. return $pipeline($this->passable);
  6. } finally {
  7. if ($this->finally) {
  8. ($this->finally)($this->passable);
  9. }
  10. }
  1. $middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
  2. return (new Pipeline($this->container))
  3. ->send($request)
  4. ->through($middleware)
  5. ->then(fn ($request) => $this->prepareResponse(
  6. $request, $route->run()
  7. ));
  8. }
  9. /**
  1. $request->setRouteResolver(fn () => $route);
  2. $this->events->dispatch(new RouteMatched($route, $request));
  3. return $this->prepareResponse($request,
  4. $this->runRouteWithinStack($route, $request)
  5. );
  6. }
  7. /**
  8. * Run the given route within a Stack "onion" instance.
  1. * @param \Illuminate\Http\Request $request
  2. * @return \Symfony\Component\HttpFoundation\Response
  3. */
  4. public function dispatchToRoute(Request $request)
  5. {
  6. return $this->runRoute($request, $this->findRoute($request));
  7. }
  8. /**
  9. * Find the route matching a given request.
  10. *
  1. */
  2. public function dispatch(Request $request)
  3. {
  4. $this->currentRequest = $request;
  5. return $this->dispatchToRoute($request);
  6. }
  7. /**
  8. * Dispatch the request to a route and return the response.
  9. *
  1. protected function dispatchToRouter()
  2. {
  3. return function ($request) {
  4. $this->app->instance('request', $request);
  5. return $this->router->dispatch($request);
  6. };
  7. }
  8. /**
  9. * Call the terminate method on any terminable middleware.
  1. */
  2. protected function prepareDestination(Closure $destination)
  3. {
  4. return function ($passable) use ($destination) {
  5. try {
  6. return $destination($passable);
  7. } catch (Throwable $e) {
  8. return $this->handleException($passable, $e);
  9. }
  10. };
  11. }
  1. * @param \Closure $next
  2. * @return mixed
  3. */
  4. public function handle($request, Closure $next)
  5. {
  6. $response = $next($request);
  7. if ($response instanceof Response && SupportDisablingBackButtonCache::$disableBackButtonCache){
  8. $response->headers->add([
  9. 'Pragma' => 'no-cache',
  10. 'Expires' => 'Fri, 01 Jan 1990 00:00:00 GMT',
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. */
  2. public function handle($request, Closure $next)
  3. {
  4. $this->clean($request);
  5. return $next($request);
  6. }
  7. /**
  8. * Clean the request's data.
  9. *
  1. if ($callback($request)) {
  2. return $next($request);
  3. }
  4. }
  5. return parent::handle($request, $next);
  6. }
  7. /**
  8. * Transform the given value.
  9. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. */
  2. public function handle($request, Closure $next)
  3. {
  4. $this->clean($request);
  5. return $next($request);
  6. }
  7. /**
  8. * Clean the request's data.
  9. *
  1. if ($callback($request)) {
  2. return $next($request);
  3. }
  4. }
  5. return parent::handle($request, $next);
  6. }
  7. /**
  8. * Transform the given value.
  9. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
  2. throw new PostTooLargeException('The POST data is too large.');
  3. }
  4. return $next($request);
  5. }
  6. /**
  7. * Determine the server 'post_max_size' as bytes.
  8. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. null,
  2. $this->getHeaders($data)
  3. );
  4. }
  5. return $next($request);
  6. }
  7. /**
  8. * Determine if the incoming request has a maintenance mode bypass cookie.
  9. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. * @return \Illuminate\Http\Response
  2. */
  3. public function handle($request, Closure $next)
  4. {
  5. if (! $this->hasMatchingPath($request)) {
  6. return $next($request);
  7. }
  8. $this->cors->setOptions($this->container['config']->get('cors', []));
  9. if ($this->cors->isPreflightRequest($request)) {
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. {
  2. $request::setTrustedProxies([], $this->getTrustedHeaderNames());
  3. $this->setTrustedProxyIpAddresses($request);
  4. return $next($request);
  5. }
  6. /**
  7. * Sets the trusted proxies on the request.
  8. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. * @param \Closure $next
  2. * @return \Symfony\Component\HttpFoundation\Response
  3. */
  4. public function handle(Request $request, Closure $next)
  5. {
  6. return $next($request);
  7. }
  8. /**
  9. * Invoke the deferred callbacks.
  10. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. $pipeline = array_reduce(
  2. array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  3. );
  4. try {
  5. return $pipeline($this->passable);
  6. } finally {
  7. if ($this->finally) {
  8. ($this->finally)($this->passable);
  9. }
  10. }
  1. $this->bootstrap();
  2. return (new Pipeline($this->app))
  3. ->send($request)
  4. ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  5. ->then($this->dispatchToRouter());
  6. }
  7. /**
  8. * Bootstrap the application for HTTP requests.
  9. *
  1. $this->requestStartedAt = Carbon::now();
  2. try {
  3. $request->enableHttpMethodParameterOverride();
  4. $response = $this->sendRequestThroughRouter($request);
  5. } catch (Throwable $e) {
  6. $this->reportException($e);
  7. $response = $this->renderException($request, $e);
  8. }
  1. */
  2. public function handleRequest(Request $request)
  3. {
  4. $kernel = $this->make(HttpKernelContract::class);
  5. $response = $kernel->handle($request)->send();
  6. $kernel->terminate($request, $response);
  7. }
  8. /**
Application->handleRequest() in /home/dwg-germany.de/dwg/public/index.php (line 17)
  1. // Register the Composer autoloader...
  2. require __DIR__.'/../vendor/autoload.php';
  3. // Bootstrap Laravel and handle the request...
  4. (require_once __DIR__.'/../bootstrap/app.php')
  5. ->handleRequest(Request::capture());

Illuminate\Database\ QueryException

SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server. (Connection: sqlsrv, SQL: select * from [service_translations] where [service_translations].[service_id] = 11 and [service_translations].[service_id] is not null)

  1. throw new UniqueConstraintViolationException(
  2. $this->getName(), $query, $this->prepareBindings($bindings), $e
  3. );
  4. }
  5. throw new QueryException(
  6. $this->getName(), $query, $this->prepareBindings($bindings), $e
  7. );
  8. }
  9. }
  1. protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback)
  2. {
  3. if ($this->causedByLostConnection($e->getPrevious())) {
  4. $this->reconnect();
  5. return $this->runQueryCallback($query, $bindings, $callback);
  6. }
  7. throw $e;
  8. }
  1. {
  2. if ($this->transactions >= 1) {
  3. throw $e;
  4. }
  5. return $this->tryAgainIfCausedByLostConnection(
  6. $e, $query, $bindings, $callback
  7. );
  8. }
  9. /**
  1. // caused by a connection that has been lost. If that is the cause, we'll try
  2. // to re-establish connection and re-run the query with a fresh connection.
  3. try {
  4. $result = $this->runQueryCallback($query, $bindings, $callback);
  5. } catch (QueryException $e) {
  6. $result = $this->handleQueryException(
  7. $e, $query, $bindings, $callback
  8. );
  9. }
  10. // Once we have run the query we will calculate the time that it took to run and
  1. * @param bool $useReadPdo
  2. * @return array
  3. */
  4. public function select($query, $bindings = [], $useReadPdo = true)
  5. {
  6. return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
  7. if ($this->pretending()) {
  8. return [];
  9. }
  10. // For select statements, we'll simply execute the query and return an array
  1. *
  2. * @return array
  3. */
  4. protected function runSelect()
  5. {
  6. return $this->connection->select(
  7. $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8. );
  9. }
  10. /**
  1. * @return \Illuminate\Support\Collection<int, \stdClass>
  2. */
  3. public function get($columns = ['*'])
  4. {
  5. $items = new Collection($this->onceWithColumns(Arr::wrap($columns), function () {
  6. return $this->processor->processSelect($this, $this->runSelect());
  7. }));
  8. return $this->applyAfterQueryCallbacks(
  9. isset($this->groupLimit) ? $this->withoutGroupLimitKeys($items) : $items
  10. );
  1. if (is_null($original)) {
  2. $this->columns = $columns;
  3. }
  4. $result = $callback();
  5. $this->columns = $original;
  6. return $result;
  7. }
  1. * @param array|string $columns
  2. * @return \Illuminate\Support\Collection<int, \stdClass>
  3. */
  4. public function get($columns = ['*'])
  5. {
  6. $items = new Collection($this->onceWithColumns(Arr::wrap($columns), function () {
  7. return $this->processor->processSelect($this, $this->runSelect());
  8. }));
  9. return $this->applyAfterQueryCallbacks(
  10. isset($this->groupLimit) ? $this->withoutGroupLimitKeys($items) : $items
  1. * @return array<int, TModel>
  2. */
  3. public function getModels($columns = ['*'])
  4. {
  5. return $this->model->hydrate(
  6. $this->query->get($columns)->all()
  7. )->all();
  8. }
  9. /**
  10. * Eager load the relationships for the models.
  1. $builder = $this->applyScopes();
  2. // If we actually found models we will also eager load any relationships that
  3. // have been specified as needing to be eager loaded, which will solve the
  4. // n+1 query issue for the developers to avoid running a lot of queries.
  5. if (count($models = $builder->getModels($columns)) > 0) {
  6. $models = $builder->eagerLoadRelations($models);
  7. }
  8. return $this->applyAfterQueryCallbacks(
  9. $builder->getModel()->newCollection($models)
  1. /** @inheritDoc */
  2. public function getResults()
  3. {
  4. return ! is_null($this->getParentKey())
  5. ? $this->query->get()
  6. : $this->related->newCollection();
  7. }
  8. /** @inheritDoc */
  9. public function initRelation(array $models, $relation)
  1. throw new LogicException(sprintf(
  2. '%s::%s must return a relationship instance.', static::class, $method
  3. ));
  4. }
  5. return tap($relation->getResults(), function ($results) use ($method) {
  6. $this->setRelation($method, $results);
  7. });
  8. }
  9. /**
  1. }
  2. // If the "attribute" exists as a method on the model, we will just assume
  3. // it is a relationship and will load and return results from the query
  4. // and hydrate the relationship's value on the "relationships" array.
  5. return $this->getRelationshipFromMethod($key);
  6. }
  7. /**
  8. * Determine if the given key is a relationship method on the model.
  9. *
  1. if (method_exists(self::class, $key)) {
  2. return $this->throwMissingAttributeExceptionIfApplicable($key);
  3. }
  4. return $this->isRelation($key) || $this->relationLoaded($key)
  5. ? $this->getRelationValue($key)
  6. : $this->throwMissingAttributeExceptionIfApplicable($key);
  7. }
  8. /**
  9. * Either throw a missing attribute exception or return null depending on Eloquent's configuration.
  1. }
  2. return $this->getAttributeOrFallback($locale, $attribute);
  3. }
  4. return parent::getAttribute($key);
  5. }
  6. public function getDefaultLocale(): ?string
  7. {
  8. return $this->defaultLocale;
  1. * @param string $key
  2. * @return mixed
  3. */
  4. public function __get($key)
  5. {
  6. return $this->getAttribute($key);
  7. }
  8. /**
  9. * Dynamically set attributes on the model.
  10. *
  1. && $this->translation->getAttribute($this->getLocaleKey()) == $key
  2. ) {
  3. return $this->translation;
  4. }
  5. return $this->translations->firstWhere($this->getLocaleKey(), $key);
  6. }
  7. protected function toArrayAlwaysLoadsTranslations(): bool
  8. {
  9. return config('translatable.to_array_always_loads_translations', true);
  1. $configFallbackLocale = $this->getFallbackLocale();
  2. $locale = $locale ?: $this->locale();
  3. $withFallback = $withFallback === null ? $this->useFallback() : $withFallback;
  4. $fallbackLocale = $this->getFallbackLocale($locale);
  5. if ($translation = $this->getTranslationByLocaleKey($locale)) {
  6. return $translation;
  7. }
  8. if ($withFallback && $fallbackLocale) {
  9. if ($translation = $this->getTranslationByLocaleKey($fallbackLocale)) {
  1. public function getAttribute($key)
  2. {
  3. [$attribute, $locale] = $this->getAttributeAndLocale($key);
  4. if ($this->isTranslationAttribute($attribute)) {
  5. if ($this->getTranslation($locale) === null) {
  6. return $this->getAttributeValue($attribute);
  7. }
  8. // If the given $attribute has a mutator, we push it to $attributes and then call getAttributeValue
  9. // on it. This way, we can use Eloquent's checking for Mutation, type casting, and
  1. * @param string $key
  2. * @return mixed
  3. */
  4. public function __get($key)
  5. {
  6. return $this->getAttribute($key);
  7. }
  8. /**
  9. * Dynamically set attributes on the model.
  10. *
  1. </div>
  2. <div class="row g-5 mt--30">
  3. <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  4. <div class="col-lg-3 col-md-4 col-sm-6 col-12">
  5. <!-- single course category -->
  6. <a href="/<?php echo e(app()->getLocale()); ?>/services/<?php echo e($service->id); ?>/<?php echo e($service->name); ?>"
  7. class="single-category-2">
  8. <img src="<?php echo e(Storage::url($service->icon)); ?>" alt="<?php echo e($service->name); ?>"
  9. style="
  10. width: 100%;
  1. try {
  2. $component = ExtendBlade::currentRendering();
  3. \Closure::bind(function () use ($__path, $__data) {
  4. extract($__data, EXTR_SKIP);
  5. include $__path;
  6. }, $component, $component)();
  7. } catch (\Exception|\Throwable $e) {
  8. $this->handleViewException($e, $obLevel);
  9. }
  1. $component = ExtendBlade::currentRendering();
  2. \Closure::bind(function () use ($__path, $__data) {
  3. extract($__data, EXTR_SKIP);
  4. include $__path;
  5. }, $component, $component)();
  6. } catch (\Exception|\Throwable $e) {
  7. $this->handleViewException($e, $obLevel);
  8. }
  9. return ltrim(ob_get_clean());
  1. // Once we have the path to the compiled file, we will evaluate the paths with
  2. // typical PHP just like any other templates. We also keep a stack of views
  3. // which have been rendered for right exception messages to be generated.
  4. try {
  5. $results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6. } catch (ViewException $e) {
  7. if (! Str::of($e->getMessage())->contains(['No such file or directory', 'File does not exist at path'])) {
  8. throw $e;
  9. }
  1. $currentComponent = ExtendBlade::currentRendering();
  2. trigger('view:compile', $currentComponent, $path);
  3. return parent::get($path, $data);
  4. }
  5. protected function evaluatePath($__path, $__data)
  6. {
  7. if (! ExtendBlade::isRenderingLivewireComponent()) {
  1. *
  2. * @return string
  3. */
  4. protected function getContents()
  5. {
  6. return $this->engine->get($this->path, $this->gatherData());
  7. }
  8. /**
  9. * Get the data bound to the view instance.
  10. *
  1. // clear out the sections for any separate views that may be rendered.
  2. $this->factory->incrementRender();
  3. $this->factory->callComposer($this);
  4. $contents = $this->getContents();
  5. // Once we've finished rendering the view, we'll decrement the render count
  6. // so that each section gets flushed out next time a view is created and
  7. // no old sections are staying around in the memory of an environment.
  8. $this->factory->decrementRender();
  1. * @throws \Throwable
  2. */
  3. public function render(?callable $callback = null)
  4. {
  5. try {
  6. $contents = $this->renderContents();
  7. $response = isset($callback) ? $callback($this, $contents) : null;
  8. // Once we have the contents of the view, we will flush the sections if we are
  9. // done rendering all views so that there is nothing left hanging over when
  1. $revertA = Utils::shareWithViews('__livewire', $component);
  2. $revertB = Utils::shareWithViews('_instance', $component); // @deprecated
  3. $viewContext = new ViewContext;
  4. $html = $view->render(function ($view) use ($viewContext) {
  5. // Extract leftover slots, sections, and pushes before they get flushed...
  6. $viewContext->extractFromEnvironment($view->getFactory());
  7. });
  8. $revertA(); $revertB();
  1. protected function trackInRenderStack($component, $callback)
  2. {
  3. array_push(static::$renderStack, $component);
  4. return tap($callback(), function () {
  5. array_pop(static::$renderStack);
  6. });
  7. }
  8. protected function updateProperties($component, $updates, $data, $context)
  1. ]);
  2. }
  3. [ $view, $properties ] = $this->getView($component);
  4. return $this->trackInRenderStack($component, function () use ($component, $view, $properties) {
  5. $finish = trigger('render', $component, $view, $properties);
  6. $revertA = Utils::shareWithViews('__livewire', $component);
  7. $revertB = Utils::shareWithViews('_instance', $component); // @deprecated
  1. if (config('app.debug')) $start = microtime(true);
  2. $finish = trigger('mount', $component, $params, $key, $parent);
  3. if (config('app.debug')) trigger('profile', 'mount', $component->getId(), [$start, microtime(true)]);
  4. if (config('app.debug')) $start = microtime(true);
  5. $html = $this->render($component, '<div></div>');
  6. if (config('app.debug')) trigger('profile', 'render', $component->getId(), [$start, microtime(true)]);
  7. if (config('app.debug')) $start = microtime(true);
  8. trigger('dehydrate', $component, $context);
  1. return app(ComponentRegistry::class)->resolveMissingComponent($resolver);
  2. }
  3. function mount($name, $params = [], $key = null)
  4. {
  5. return app(HandleComponents::class)->mount($name, $params, $key);
  6. }
  7. function snapshot($component, $context = null)
  8. {
  9. return app(HandleComponents::class)->snapshot($component, $context);
  1. $html = null;
  2. $layoutConfig = SupportPageComponents::interceptTheRenderOfTheComponentAndRetreiveTheLayoutConfiguration(function () use (&$html) {
  3. $params = SupportPageComponents::gatherMountMethodParamsFromRouteParameters($this);
  4. $html = app('livewire')->mount($this::class, $params);
  5. });
  6. $layoutConfig = $layoutConfig ?: new PageComponentConfig;
  7. $layoutConfig->normalizeViewNameAndParamsForBladeComponents();
  1. });
  2. on('render', $handler);
  3. on('render.placeholder', $handler);
  4. $callback();
  5. off('render', $handler);
  6. off('render.placeholder', $handler);
  7. return $layoutConfig;
in /home/dwg-germany.de/dwg/vendor/livewire/livewire/src/Features/SupportPageComponents/HandlesPageComponents.php :: interceptTheRenderOfTheComponentAndRetreiveTheLayoutConfiguration (line 14)
  1. // Here's we're hooking into the "__invoke" method being called on a component.
  2. // This way, users can pass Livewire components into Routes as if they were
  3. // simple invokable controllers. Ex: Route::get('...', SomeLivewireComponent::class);
  4. $html = null;
  5. $layoutConfig = SupportPageComponents::interceptTheRenderOfTheComponentAndRetreiveTheLayoutConfiguration(function () use (&$html) {
  6. $params = SupportPageComponents::gatherMountMethodParamsFromRouteParameters($this);
  7. $html = app('livewire')->mount($this::class, $params);
  8. });
  1. if (method_exists($controller, 'callAction')) {
  2. return $controller->callAction($method, $parameters);
  3. }
  4. return $controller->{$method}(...array_values($parameters));
  5. }
  6. /**
  7. * Resolve the parameters for the controller.
  8. *
  1. *
  2. * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  3. */
  4. protected function runController()
  5. {
  6. return $this->controllerDispatcher()->dispatch(
  7. $this, $this->getController(), $this->getControllerMethod()
  8. );
  9. }
  10. /**
  1. {
  2. $this->container = $this->container ?: new Container;
  3. try {
  4. if ($this->isControllerAction()) {
  5. return $this->runController();
  6. }
  7. return $this->runCallable();
  8. } catch (HttpResponseException $e) {
  9. return $e->getResponse();
  1. return (new Pipeline($this->container))
  2. ->send($request)
  3. ->through($middleware)
  4. ->then(fn ($request) => $this->prepareResponse(
  5. $request, $route->run()
  6. ));
  7. }
  8. /**
  9. * Gather the middleware for the given route with resolved class names.
  1. */
  2. protected function prepareDestination(Closure $destination)
  3. {
  4. return function ($passable) use ($destination) {
  5. try {
  6. return $destination($passable);
  7. } catch (Throwable $e) {
  8. return $this->handleException($passable, $e);
  9. }
  10. };
  11. }
Pipeline->Illuminate\Pipeline\{closure}() in /home/dwg-germany.de/dwg/app/Http/Middleware/Shared.php (line 25)
  1. $footer_header=PageContent::whereIN('page', ['footer','header'])
  2. ->where('locale', app()->getLocale())
  3. ->pluck('value', 'key')
  4. ->toArray();
  5. View::share('footer_header', $footer_header);
  6. return $next($request);
  7. }
  8. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
Pipeline->Illuminate\Pipeline\{closure}() in /home/dwg-germany.de/dwg/app/Http/Middleware/SetLocale.php (line 24)
  1. App::setLocale($locale);
  2. // dd(0);
  3. // return redirect($locale . '/' . $request->path());
  4. }
  5. return $next($request);
  6. }
  7. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. }
  2. throw $exception;
  3. }
  4. return $next($request);
  5. }
  6. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. $this->isReading($request) ||
  2. $this->runningUnitTests() ||
  3. $this->inExceptArray($request) ||
  4. $this->tokensMatch($request)
  5. ) {
  6. return tap($next($request), function ($response) use ($request) {
  7. if ($this->shouldAddXsrfTokenCookie()) {
  8. $this->addCookieToResponse($request, $response);
  9. }
  10. });
  11. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. // Putting the errors in the view for every view allows the developer to just
  2. // assume that some errors are always available, which is convenient since
  3. // they don't have to continually run checks for the presence of errors.
  4. return $next($request);
  5. }
  6. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. $this->startSession($request, $session)
  2. );
  3. $this->collectGarbage($session);
  4. $response = $next($request);
  5. $this->storeCurrentUrl($request, $session);
  6. $this->addCookieToResponse($response, $session);
  1. if ($this->manager->shouldBlock() ||
  2. ($request->route() instanceof Route && $request->route()->locksFor())) {
  3. return $this->handleRequestWhileBlocking($request, $session, $next);
  4. }
  5. return $this->handleStatefulRequest($request, $session, $next);
  6. }
  7. /**
  8. * Handle the given request within session state.
  9. *
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. * @param \Closure $next
  2. * @return mixed
  3. */
  4. public function handle($request, Closure $next)
  5. {
  6. $response = $next($request);
  7. foreach ($this->cookies->getQueuedCookies() as $cookie) {
  8. $response->headers->setCookie($cookie);
  9. }
  1. // since the object we're given was already a fully instantiated object.
  2. $parameters = [$passable, $stack];
  3. }
  4. $carry = method_exists($pipe, $this->method)
  5. ? $pipe->{$this->method}(...$parameters)
  6. : $pipe(...$parameters);
  7. return $this->handleCarry($carry);
  8. } catch (Throwable $e) {
  9. return $this->handleException($passable, $e);
  1. * @param \Closure $next
  2. * @return \Symfony\Component\HttpFoundation\Response
  3. */
  4. public function handle($request, Closure $next)
  5. {
  6. return $this->encrypt($next($this->decrypt($request)));
  7. }
  8. /**
  9. * Decrypt the cookies on the request.
  10. *
<?php

namespace Illuminate\Pipeline;

use Closure;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Pipeline\Pipeline as PipelineContract;
use Illuminate\Support\Traits\Conditionable;
use RuntimeException;
use Throwable;

class Pipeline implements PipelineContract
{
    use Conditionable;

    /**
     * The container implementation.
     *
     * @var \Illuminate\Contracts\Container\Container|null
     */
    protected $container;

    /**
     * The object being passed through the pipeline.
     *
     * @var mixed
     */
    protected $passable;

    /**
     * The array of class pipes.
     *
     * @var array
     */
    protected $pipes = [];

    /**
     * The method to call on each pipe.
     *
     * @var string
     */
    protected $method = 'handle';

    /**
     * The final callback to be executed after the pipeline ends regardless of the outcome.
     *
     * @var \Closure|null
     */
    protected $finally;

    /**
     * Create a new class instance.
     *
     * @param  \Illuminate\Contracts\Container\Container|null  $container
     * @return void
     */
    public function __construct(?Container $container = null)
    {
        $this->container = $container;
    }

    /**
     * Set the object being sent through the pipeline.
     *
     * @param  mixed  $passable
     * @return $this
     */
    public function send($passable)
    {
        $this->passable = $passable;

        return $this;
    }

    /**
     * Set the array of pipes.
     *
     * @param  array|mixed  $pipes
     * @return $this
     */
    public function through($pipes)
    {
        $this->pipes = is_array($pipes) ? $pipes : func_get_args();

        return $this;
    }

    /**
     * Push additional pipes onto the pipeline.
     *
     * @param  array|mixed  $pipes
     * @return $this
     */
    public function pipe($pipes)
    {
        array_push($this->pipes, ...(is_array($pipes) ? $pipes : func_get_args()));

        return $this;
    }

    /**
     * Set the method to call on the pipes.
     *
     * @param  string  $method
     * @return $this
     */
    public function via($method)
    {
        $this->method = $method;

        return $this;
    }

    /**
     * Run the pipeline with a final destination callback.
     *
     * @param  \Closure  $destination
     * @return mixed
     */
    public function then(Closure $destination)
    {
        $pipeline = array_reduce(
            array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
        );

        try {
            return $pipeline($this->passable);
        } finally {
            if ($this->finally) {
                ($this->finally)($this->passable);
            }
        }
    }

    /**
     * Run the pipeline and return the result.
     *
     * @return mixed
     */
    public function thenReturn()
    {
        return $this->then(function ($passable) {
            return $passable;
        });
    }

    /**
     * Set a final callback to be executed after the pipeline ends regardless of the outcome.
     *
     * @param  \Closure  $callback
     * @return $this
     */
    public function finally(Closure $callback)
    {
        $this->finally = $callback;

        return $this;
    }

    /**
     * Get the final piece of the Closure onion.
     *
     * @param  \Closure  $destination
     * @return \Closure
     */
    protected function prepareDestination(Closure $destination)
    {
        return function ($passable) use ($destination) {
            try {
                return $destination($passable);
            } catch (Throwable $e) {
                return $this->handleException($passable, $e);
            }
        };
    }

    /**
     * Get a Closure that represents a slice of the application onion.
     *
     * @return \Closure
     */
    protected function carry()
    {
        return function ($stack, $pipe) {
            return function ($passable) use ($stack, $pipe) {
                try {
                    if (is_callable($pipe)) {
                        // If the pipe is a callable, then we will call it directly, but otherwise we
                        // will resolve the pipes out of the dependency container and call it with
                        // the appropriate method and arguments, returning the results back out.
                        return $pipe($passable, $stack);
                    } elseif (! is_object($pipe)) {
                        [$name, $parameters] = $this->parsePipeString($pipe);

                        // If the pipe is a string we will parse the string and resolve the class out
                        // of the dependency injection container. We can then build a callable and
                        // execute the pipe function giving in the parameters that are required.
                        $pipe = $this->getContainer()->make($name);

                        $parameters = array_merge([$passable, $stack], $parameters);
                    } else {
                        // If the pipe is already an object we'll just make a callable and pass it to
                        // the pipe as-is. There is no need to do any extra parsing and formatting
                        // 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);
                }
            };
        };
    }

    /**
     * Parse full pipe string to get name and parameters.
     *
     * @param  string  $pipe
     * @return array
     */
    protected function parsePipeString($pipe)
    {
        [$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, null);

        if (! is_null($parameters)) {
            $parameters = explode(',', $parameters);
        } else {
            $parameters = [];
        }

        return [$name, $parameters];
    }

    /**
     * Get the array of configured pipes.
     *
     * @return array
     */
    protected function pipes()
    {
        return $this->pipes;
    }

    /**
     * Get the container instance.
     *
     * @return \Illuminate\Contracts\Container\Container
     *
     * @throws \RuntimeExcep