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. *
  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());

PDOException

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.

  1. * @return \PDO
  2. */
  3. protected function createPdoConnection($dsn, $username, #[\SensitiveParameter] $password, $options)
  4. {
  5. return version_compare(phpversion(), '8.4.0', '<')
  6. ? new PDO($dsn, $username, $password, $options)
  7. : PDO::connect($dsn, $username, $password, $options); /** @phpstan-ignore staticMethod.notFound (PHP 8.4) */
  8. }
  9. /**
  10. * Handle an exception that occurred during connect execution.
  1. * @return \PDO
  2. */
  3. protected function createPdoConnection($dsn, $username, #[\SensitiveParameter] $password, $options)
  4. {
  5. return version_compare(phpversion(), '8.4.0', '<')
  6. ? new PDO($dsn, $username, $password, $options)
  7. : PDO::connect($dsn, $username, $password, $options); /** @phpstan-ignore staticMethod.notFound (PHP 8.4) */
  8. }
  9. /**
  10. * Handle an exception that occurred during connect execution.
  1. [$username, $password] = [
  2. $config['username'] ?? null, $config['password'] ?? null,
  3. ];
  4. try {
  5. return $this->createPdoConnection(
  6. $dsn, $username, $password, $options
  7. );
  8. } catch (Exception $e) {
  9. return $this->tryAgainIfCausedByLostConnection(
  10. $e, $dsn, $username, $password, $options
  1. */
  2. public function connect(array $config)
  3. {
  4. $options = $this->getOptions($config);
  5. $connection = $this->createConnection($this->getDsn($config), $config, $options);
  6. $this->configureIsolationLevel($connection, $config);
  7. return $connection;
  8. }
  1. return function () use ($config) {
  2. foreach (Arr::shuffle($this->parseHosts($config)) as $host) {
  3. $config['host'] = $host;
  4. try {
  5. return $this->createConnector($config)->connect($config);
  6. } catch (PDOException $e) {
  7. continue;
  8. }
  9. }
ConnectionFactory->Illuminate\Database\Connectors\{closure}()
  1. * @return \PDO
  2. */
  3. public function getPdo()
  4. {
  5. if ($this->pdo instanceof Closure) {
  6. return $this->pdo = call_user_func($this->pdo);
  7. }
  8. return $this->pdo;
  9. }
  1. if ($this->readPdo instanceof Closure) {
  2. return $this->readPdo = call_user_func($this->readPdo);
  3. }
  4. return $this->readPdo ?: $this->getPdo();
  5. }
  6. /**
  7. * Get the current read PDO connection parameter without executing any reconnect logic.
  8. *
  1. * @param bool $useReadPdo
  2. * @return \PDO
  3. */
  4. protected function getPdoForSelect($useReadPdo = true)
  5. {
  6. return $useReadPdo ? $this->getReadPdo() : $this->getPdo();
  7. }
  8. /**
  9. * Run an insert statement against the database.
  10. *
  1. // For select statements, we'll simply execute the query and return an array
  2. // of the database result set. Each element in the array will be a single
  3. // row from the database table, and will either be an array or objects.
  4. $statement = $this->prepared(
  5. $this->getPdoForSelect($useReadPdo)->prepare($query)
  6. );
  7. $this->bindValues($statement, $this->prepareBindings($bindings));
  8. $statement->execute();
  1. {
  2. // To execute the statement, we'll simply call the callback, which will actually
  3. // run the SQL against the PDO connection. Then we can calculate the time it
  4. // took to execute and log the query SQL, bindings and time in our memory.
  5. try {
  6. return $callback($query, $bindings);
  7. }
  8. // If an exception occurs when attempting to run a query, we'll format the error
  9. // message to include the bindings with SQL, which will make this exception a
  10. // lot more helpful to the developer instead of just the database's errors.
  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. /**
<?php

namespace Illuminate\Database;

use Carbon\CarbonInterval;
use Closure;
use DateTimeInterface;
use Exception;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Events\QueryExecuted;
use Illuminate\Database\Events\StatementPrepared;
use Illuminate\Database\Events\TransactionBeginning;
use Illuminate\Database\Events\TransactionCommitted;
use Illuminate\Database\Events\TransactionCommitting;
use Illuminate\Database\Events\TransactionRolledBack;
use Illuminate\Database\Query\Builder as QueryBuilder;
use Illuminate\Database\Query\Expression;
use Illuminate\Database\Query\Grammars\Grammar as QueryGrammar;
use Illuminate\Database\Query\Processors\Processor;
use Illuminate\Database\Schema\Builder as SchemaBuilder;
use Illuminate\Support\Arr;
use Illuminate\Support\InteractsWithTime;
use Illuminate\Support\Traits\Macroable;
use PDO;
use PDOStatement;
use RuntimeException;

class Connection implements ConnectionInterface
{
    use DetectsConcurrencyErrors,
        DetectsLostConnections,
        Concerns\ManagesTransactions,
        InteractsWithTime,
        Macroable;

    /**
     * The active PDO connection.
     *
     * @var \PDO|\Closure
     */
    protected $pdo;

    /**
     * The active PDO connection used for reads.
     *
     * @var \PDO|\Closure
     */
    protected $readPdo;

    /**
     * The name of the connected database.
     *
     * @var string
     */
    protected $database;

    /**
     * The type of the connection.
     *
     * @var string|null
     */
    protected $readWriteType;

    /**
     * The table prefix for the connection.
     *
     * @var string
     */
    protected $tablePrefix = '';

    /**
     * The database connection configuration options.
     *
     * @var array
     */
    protected $config = [];

    /**
     * The reconnector instance for the connection.
     *
     * @var