Symfony Exception

PDOException Exception QueryException

HTTP 500 Internal Server Error

SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `settings`)

Exceptions 3

Illuminate\Database\ QueryException

  1.         // If an exception occurs when attempting to run a query, we'll format the error
  2.         // message to include the bindings with SQL, which will make this exception a
  3.         // lot more helpful to the developer instead of just the database's errors.
  4.         catch (Exception $e) {
  5.             throw new QueryException(
  6.                 $query$this->prepareBindings($bindings), $e
  7.             );
  8.         }
  9.     }
  1.     protected function tryAgainIfCausedByLostConnection(QueryException $e$query$bindingsClosure $callback)
  2.     {
  3.         if ($this->causedByLostConnection($e->getPrevious())) {
  4.             $this->reconnect();
  5.             return $this->runQueryCallback($query$bindings$callback);
  6.         }
  7.         throw $e;
  8.     }
  1.         if ($this->transactions >= 1) {
  2.             throw $e;
  3.         }
  4.         return $this->tryAgainIfCausedByLostConnection(
  5.             $e$query$bindings$callback
  6.         );
  7.     }
  8.     /**
  9.      * Handle a query exception that occurred during query execution.
  1.         // to re-establish connection and re-run the query with a fresh connection.
  2.         try {
  3.             $result $this->runQueryCallback($query$bindings$callback);
  4.         } catch (QueryException $e) {
  5.             $result $this->handleQueryException(
  6.                 $e$query$bindings$callback
  7.             );
  8.         }
  9.         // Once we have run the query we will calculate the time that it took to run and
  10.         // then log the query, bindings, and execution time so we will report them on
  1.             $this->bindValues($statement$this->prepareBindings($bindings));
  2.             $statement->execute();
  3.             return $statement->fetchAll();
  4.         });
  5.     }
  6.     /**
  7.      * Run a select statement against the database and returns a generator.
  8.      *
  1.      * @return array
  2.      */
  3.     protected function runSelect()
  4.     {
  5.         return $this->connection->select(
  6.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  7.         );
  8.     }
  9.     /**
  10.      * Paginate the given query into a simple paginator.
  1.      * @return \Illuminate\Support\Collection
  2.      */
  3.     public function get($columns = ['*'])
  4.     {
  5.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6.             return $this->processor->processSelect($this$this->runSelect());
  7.         }));
  8.     }
  9.     /**
  10.      * Run the query as a "select" statement against the connection.
  1.         if (is_null($original)) {
  2.             $this->columns $columns;
  3.         }
  4.         $result $callback();
  5.         $this->columns $original;
  6.         return $result;
  7.     }
  1.      */
  2.     public function get($columns = ['*'])
  3.     {
  4.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  5.             return $this->processor->processSelect($this$this->runSelect());
  6.         }));
  7.     }
  8.     /**
  9.      * Run the query as a "select" statement against the connection.
  10.      *
  1.      * @return \Illuminate\Database\Eloquent\Model[]|static[]
  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 $builder->getModel()->newCollection($models);
  9.     }
  1.      * @return \Illuminate\Database\Eloquent\Collection<int, static>
  2.      */
  3.     public static function all($columns = ['*'])
  4.     {
  5.         return static::query()->get(
  6.             is_array($columns) ? $columns func_get_args()
  7.         );
  8.     }
  9.     /**
  10.      * Begin querying a model with eager loading.
  1.      */
  2.     public function boot()
  3.     {
  4.         // only use the Settings package if the Settings table is present in the database
  5.         //if (!\App::runningInConsole() && count(Schema::getColumnListing('settings'))) {
  6.             $settings Setting::all();
  7.             foreach ($settings as $key => $setting)
  8.             {
  9.                 Config::set('settings.'.$setting->key$setting->value);
  10.             }
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  ...$args
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value, ...$args)
  5.     {
  6.         return $value instanceof Closure $value(...$args) : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.             $this->buildStack[] = $className;
  2.             $pushedToBuildStack true;
  3.         }
  4.         $result BoundMethod::call($this$callback$parameters$defaultMethod);
  5.         if ($pushedToBuildStack) {
  6.             array_pop($this->buildStack);
  7.         }
  1.     protected function bootProvider(ServiceProvider $provider)
  2.     {
  3.         $provider->callBootingCallbacks();
  4.         if (method_exists($provider'boot')) {
  5.             $this->call([$provider'boot']);
  6.         }
  7.         $provider->callBootedCallbacks();
  8.     }
  1.         // for any listeners that need to do work after this initial booting gets
  2.         // finished. This is useful when ordering the boot-up processes we run.
  3.         $this->fireAppCallbacks($this->bootingCallbacks);
  4.         array_walk($this->serviceProviders, function ($p) {
  5.             $this->bootProvider($p);
  6.         });
  7.         $this->booted true;
  8.         $this->fireAppCallbacks($this->bootedCallbacks);
Application->Illuminate\Foundation\{closure}()
  1.         // finished. This is useful when ordering the boot-up processes we run.
  2.         $this->fireAppCallbacks($this->bootingCallbacks);
  3.         array_walk($this->serviceProviders, function ($p) {
  4.             $this->bootProvider($p);
  5.         });
  6.         $this->booted true;
  7.         $this->fireAppCallbacks($this->bootedCallbacks);
  8.     }
  1.      * @param  \Illuminate\Contracts\Foundation\Application  $app
  2.      * @return void
  3.      */
  4.     public function bootstrap(Application $app)
  5.     {
  6.         $app->boot();
  7.     }
  8. }
  1.         $this->hasBeenBootstrapped true;
  2.         foreach ($bootstrappers as $bootstrapper) {
  3.             $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
  4.             $this->make($bootstrapper)->bootstrap($this);
  5.             $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
  6.         }
  7.     }
  1.      * @return void
  2.      */
  3.     public function bootstrap()
  4.     {
  5.         if (! $this->app->hasBeenBootstrapped()) {
  6.             $this->app->bootstrapWith($this->bootstrappers());
  7.         }
  8.     }
  9.     /**
  10.      * Get the route dispatcher callback.
  1.     {
  2.         $this->app->instance('request'$request);
  3.         Facade::clearResolvedInstance('request');
  4.         $this->bootstrap();
  5.         return (new Pipeline($this->app))
  6.                     ->send($request)
  7.                     ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  8.                     ->then($this->dispatchToRouter());
  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. $kernel $app->make(Illuminate\Contracts\Http\Kernel::class);
  3. $response $kernel->handle(
  4.     $request Illuminate\Http\Request::capture()
  5. );
  6. $response->send();
  7. $kernel->terminate($request$response);

Doctrine\DBAL\Driver\PDO\ Exception

SQLSTATE[HY000] [2002] Connection refused

  1.  */
  2. final class Exception extends PDOException
  3. {
  4.     public static function new(\PDOException $exception): self
  5.     {
  6.         return new self($exception);
  7.     }
  8. }
  1.         try {
  2.             parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
  3.             $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
  4.             $this->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
  5.         } catch (PDOException $exception) {
  6.             throw Exception::new($exception);
  7.         }
  8.     }
  9.     /**
  10.      * {@inheritdoc}
  1.      * @return \PDO
  2.      */
  3.     protected function createPdoConnection($dsn$username$password$options)
  4.     {
  5.         if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
  6.             return new PDOConnection($dsn$username$password$options);
  7.         }
  8.         return new PDO($dsn$username$password$options);
  9.     }
  1.      * @throws \Exception
  2.      */
  3.     protected function tryAgainIfCausedByLostConnection(Throwable $e$dsn$username$password$options)
  4.     {
  5.         if ($this->causedByLostConnection($e)) {
  6.             return $this->createPdoConnection($dsn$username$password$options);
  7.         }
  8.         throw $e;
  9.     }
  1.             return $this->createPdoConnection(
  2.                 $dsn$username$password$options
  3.             );
  4.         } catch (Exception $e) {
  5.             return $this->tryAgainIfCausedByLostConnection(
  6.                 $e$dsn$username$password$options
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         $options $this->getOptions($config);
  2.         // We need to grab the PDO options that should be used while making the brand
  3.         // new connection instance. The PDO options control various aspects of the
  4.         // connection's behavior, and some might be specified by the developers.
  5.         $connection $this->createConnection($dsn$config$options);
  6.         if (! empty($config['database'])) {
  7.             $connection->exec("use `{$config['database']}`;");
  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$bindingsClosure $callback)
  2.     {
  3.         if ($this->causedByLostConnection($e->getPrevious())) {
  4.             $this->reconnect();
  5.             return $this->runQueryCallback($query$bindings$callback);
  6.         }
  7.         throw $e;
  8.     }
  1.         if ($this->transactions >= 1) {
  2.             throw $e;
  3.         }
  4.         return $this->tryAgainIfCausedByLostConnection(
  5.             $e$query$bindings$callback
  6.         );
  7.     }
  8.     /**
  9.      * Handle a query exception that occurred during query execution.
  1.         // to re-establish connection and re-run the query with a fresh connection.
  2.         try {
  3.             $result $this->runQueryCallback($query$bindings$callback);
  4.         } catch (QueryException $e) {
  5.             $result $this->handleQueryException(
  6.                 $e$query$bindings$callback
  7.             );
  8.         }
  9.         // Once we have run the query we will calculate the time that it took to run and
  10.         // then log the query, bindings, and execution time so we will report them on
  1.             $this->bindValues($statement$this->prepareBindings($bindings));
  2.             $statement->execute();
  3.             return $statement->fetchAll();
  4.         });
  5.     }
  6.     /**
  7.      * Run a select statement against the database and returns a generator.
  8.      *
  1.      * @return array
  2.      */
  3.     protected function runSelect()
  4.     {
  5.         return $this->connection->select(
  6.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  7.         );
  8.     }
  9.     /**
  10.      * Paginate the given query into a simple paginator.
  1.      * @return \Illuminate\Support\Collection
  2.      */
  3.     public function get($columns = ['*'])
  4.     {
  5.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6.             return $this->processor->processSelect($this$this->runSelect());
  7.         }));
  8.     }
  9.     /**
  10.      * Run the query as a "select" statement against the connection.
  1.         if (is_null($original)) {
  2.             $this->columns $columns;
  3.         }
  4.         $result $callback();
  5.         $this->columns $original;
  6.         return $result;
  7.     }
  1.      */
  2.     public function get($columns = ['*'])
  3.     {
  4.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  5.             return $this->processor->processSelect($this$this->runSelect());
  6.         }));
  7.     }
  8.     /**
  9.      * Run the query as a "select" statement against the connection.
  10.      *
  1.      * @return \Illuminate\Database\Eloquent\Model[]|static[]
  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 $builder->getModel()->newCollection($models);
  9.     }
  1.      * @return \Illuminate\Database\Eloquent\Collection<int, static>
  2.      */
  3.     public static function all($columns = ['*'])
  4.     {
  5.         return static::query()->get(
  6.             is_array($columns) ? $columns func_get_args()
  7.         );
  8.     }
  9.     /**
  10.      * Begin querying a model with eager loading.
  1.      */
  2.     public function boot()
  3.     {
  4.         // only use the Settings package if the Settings table is present in the database
  5.         //if (!\App::runningInConsole() && count(Schema::getColumnListing('settings'))) {
  6.             $settings Setting::all();
  7.             foreach ($settings as $key => $setting)
  8.             {
  9.                 Config::set('settings.'.$setting->key$setting->value);
  10.             }
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  ...$args
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value, ...$args)
  5.     {
  6.         return $value instanceof Closure $value(...$args) : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.             $this->buildStack[] = $className;
  2.             $pushedToBuildStack true;
  3.         }
  4.         $result BoundMethod::call($this$callback$parameters$defaultMethod);
  5.         if ($pushedToBuildStack) {
  6.             array_pop($this->buildStack);
  7.         }
  1.     protected function bootProvider(ServiceProvider $provider)
  2.     {
  3.         $provider->callBootingCallbacks();
  4.         if (method_exists($provider'boot')) {
  5.             $this->call([$provider'boot']);
  6.         }
  7.         $provider->callBootedCallbacks();
  8.     }
  1.         // for any listeners that need to do work after this initial booting gets
  2.         // finished. This is useful when ordering the boot-up processes we run.
  3.         $this->fireAppCallbacks($this->bootingCallbacks);
  4.         array_walk($this->serviceProviders, function ($p) {
  5.             $this->bootProvider($p);
  6.         });
  7.         $this->booted true;
  8.         $this->fireAppCallbacks($this->bootedCallbacks);
Application->Illuminate\Foundation\{closure}()
  1.         // finished. This is useful when ordering the boot-up processes we run.
  2.         $this->fireAppCallbacks($this->bootingCallbacks);
  3.         array_walk($this->serviceProviders, function ($p) {
  4.             $this->bootProvider($p);
  5.         });
  6.         $this->booted true;
  7.         $this->fireAppCallbacks($this->bootedCallbacks);
  8.     }
  1.      * @param  \Illuminate\Contracts\Foundation\Application  $app
  2.      * @return void
  3.      */
  4.     public function bootstrap(Application $app)
  5.     {
  6.         $app->boot();
  7.     }
  8. }
  1.         $this->hasBeenBootstrapped true;
  2.         foreach ($bootstrappers as $bootstrapper) {
  3.             $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
  4.             $this->make($bootstrapper)->bootstrap($this);
  5.             $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
  6.         }
  7.     }
  1.      * @return void
  2.      */
  3.     public function bootstrap()
  4.     {
  5.         if (! $this->app->hasBeenBootstrapped()) {
  6.             $this->app->bootstrapWith($this->bootstrappers());
  7.         }
  8.     }
  9.     /**
  10.      * Get the route dispatcher callback.
  1.     {
  2.         $this->app->instance('request'$request);
  3.         Facade::clearResolvedInstance('request');
  4.         $this->bootstrap();
  5.         return (new Pipeline($this->app))
  6.                     ->send($request)
  7.                     ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  8.                     ->then($this->dispatchToRouter());
  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. $kernel $app->make(Illuminate\Contracts\Http\Kernel::class);
  3. $response $kernel->handle(
  4.     $request Illuminate\Http\Request::capture()
  5. );
  6. $response->send();
  7. $kernel->terminate($request$response);

PDOException

SQLSTATE[HY000] [2002] Connection refused

  1.      * @throws PDOException In case of an error.
  2.      */
  3.     public function __construct($dsn$user null$password null, ?array $options null)
  4.     {
  5.         try {
  6.             parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
  7.             $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
  8.             $this->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
  9.         } catch (PDOException $exception) {
  10.             throw Exception::new($exception);
  11.         }
  1.      * @throws PDOException In case of an error.
  2.      */
  3.     public function __construct($dsn$user null$password null, ?array $options null)
  4.     {
  5.         try {
  6.             parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
  7.             $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
  8.             $this->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
  9.         } catch (PDOException $exception) {
  10.             throw Exception::new($exception);
  11.         }
  1.      * @return \PDO
  2.      */
  3.     protected function createPdoConnection($dsn$username$password$options)
  4.     {
  5.         if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
  6.             return new PDOConnection($dsn$username$password$options);
  7.         }
  8.         return new PDO($dsn$username$password$options);
  9.     }
  1.      * @throws \Exception
  2.      */
  3.     protected function tryAgainIfCausedByLostConnection(Throwable $e$dsn$username$password$options)
  4.     {
  5.         if ($this->causedByLostConnection($e)) {
  6.             return $this->createPdoConnection($dsn$username$password$options);
  7.         }
  8.         throw $e;
  9.     }
  1.             return $this->createPdoConnection(
  2.                 $dsn$username$password$options
  3.             );
  4.         } catch (Exception $e) {
  5.             return $this->tryAgainIfCausedByLostConnection(
  6.                 $e$dsn$username$password$options
  7.             );
  8.         }
  9.     }
  10.     /**
  1.         $options $this->getOptions($config);
  2.         // We need to grab the PDO options that should be used while making the brand
  3.         // new connection instance. The PDO options control various aspects of the
  4.         // connection's behavior, and some might be specified by the developers.
  5.         $connection $this->createConnection($dsn$config$options);
  6.         if (! empty($config['database'])) {
  7.             $connection->exec("use `{$config['database']}`;");
  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$bindingsClosure $callback)
  2.     {
  3.         if ($this->causedByLostConnection($e->getPrevious())) {
  4.             $this->reconnect();
  5.             return $this->runQueryCallback($query$bindings$callback);
  6.         }
  7.         throw $e;
  8.     }
  1.         if ($this->transactions >= 1) {
  2.             throw $e;
  3.         }
  4.         return $this->tryAgainIfCausedByLostConnection(
  5.             $e$query$bindings$callback
  6.         );
  7.     }
  8.     /**
  9.      * Handle a query exception that occurred during query execution.
  1.         // to re-establish connection and re-run the query with a fresh connection.
  2.         try {
  3.             $result $this->runQueryCallback($query$bindings$callback);
  4.         } catch (QueryException $e) {
  5.             $result $this->handleQueryException(
  6.                 $e$query$bindings$callback
  7.             );
  8.         }
  9.         // Once we have run the query we will calculate the time that it took to run and
  10.         // then log the query, bindings, and execution time so we will report them on
  1.             $this->bindValues($statement$this->prepareBindings($bindings));
  2.             $statement->execute();
  3.             return $statement->fetchAll();
  4.         });
  5.     }
  6.     /**
  7.      * Run a select statement against the database and returns a generator.
  8.      *
  1.      * @return array
  2.      */
  3.     protected function runSelect()
  4.     {
  5.         return $this->connection->select(
  6.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  7.         );
  8.     }
  9.     /**
  10.      * Paginate the given query into a simple paginator.
  1.      * @return \Illuminate\Support\Collection
  2.      */
  3.     public function get($columns = ['*'])
  4.     {
  5.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  6.             return $this->processor->processSelect($this$this->runSelect());
  7.         }));
  8.     }
  9.     /**
  10.      * Run the query as a "select" statement against the connection.
  1.         if (is_null($original)) {
  2.             $this->columns $columns;
  3.         }
  4.         $result $callback();
  5.         $this->columns $original;
  6.         return $result;
  7.     }
  1.      */
  2.     public function get($columns = ['*'])
  3.     {
  4.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  5.             return $this->processor->processSelect($this$this->runSelect());
  6.         }));
  7.     }
  8.     /**
  9.      * Run the query as a "select" statement against the connection.
  10.      *
  1.      * @return \Illuminate\Database\Eloquent\Model[]|static[]
  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 $builder->getModel()->newCollection($models);
  9.     }
  1.      * @return \Illuminate\Database\Eloquent\Collection<int, static>
  2.      */
  3.     public static function all($columns = ['*'])
  4.     {
  5.         return static::query()->get(
  6.             is_array($columns) ? $columns func_get_args()
  7.         );
  8.     }
  9.     /**
  10.      * Begin querying a model with eager loading.
  1.      */
  2.     public function boot()
  3.     {
  4.         // only use the Settings package if the Settings table is present in the database
  5.         //if (!\App::runningInConsole() && count(Schema::getColumnListing('settings'))) {
  6.             $settings Setting::all();
  7.             foreach ($settings as $key => $setting)
  8.             {
  9.                 Config::set('settings.'.$setting->key$setting->value);
  10.             }
  1.         if (static::isCallableWithAtSign($callback) || $defaultMethod) {
  2.             return static::callClass($container$callback$parameters$defaultMethod);
  3.         }
  4.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  5.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  6.         });
  7.     }
  8.     /**
  9.      * Call a string reference to a class using Class@method syntax.
  1.      * @param  mixed  ...$args
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value, ...$args)
  5.     {
  6.         return $value instanceof Closure $value(...$args) : $value;
  7.     }
  8.     /**
  9.      * Get the class name of the given parameter's type, if possible.
  10.      *
  1.         if ($container->hasMethodBinding($method)) {
  2.             return $container->callMethodBinding($method$callback[0]);
  3.         }
  4.         return Util::unwrapIfClosure($default);
  5.     }
  6.     /**
  7.      * Normalize the given callback into a Class@method string.
  8.      *
  1.             return static::callClass($container$callback$parameters$defaultMethod);
  2.         }
  3.         return static::callBoundMethod($container$callback, function () use ($container$callback$parameters) {
  4.             return $callback(...array_values(static::getMethodDependencies($container$callback$parameters)));
  5.         });
  6.     }
  7.     /**
  8.      * Call a string reference to a class using Class@method syntax.
  9.      *
  1.             $this->buildStack[] = $className;
  2.             $pushedToBuildStack true;
  3.         }
  4.         $result BoundMethod::call($this$callback$parameters$defaultMethod);
  5.         if ($pushedToBuildStack) {
  6.             array_pop($this->buildStack);
  7.         }
  1.     protected function bootProvider(ServiceProvider $provider)
  2.     {
  3.         $provider->callBootingCallbacks();
  4.         if (method_exists($provider'boot')) {
  5.             $this->call([$provider'boot']);
  6.         }
  7.         $provider->callBootedCallbacks();
  8.     }
  1.         // for any listeners that need to do work after this initial booting gets
  2.         // finished. This is useful when ordering the boot-up processes we run.
  3.         $this->fireAppCallbacks($this->bootingCallbacks);
  4.         array_walk($this->serviceProviders, function ($p) {
  5.             $this->bootProvider($p);
  6.         });
  7.         $this->booted true;
  8.         $this->fireAppCallbacks($this->bootedCallbacks);
Application->Illuminate\Foundation\{closure}()
  1.         // finished. This is useful when ordering the boot-up processes we run.
  2.         $this->fireAppCallbacks($this->bootingCallbacks);
  3.         array_walk($this->serviceProviders, function ($p) {
  4.             $this->bootProvider($p);
  5.         });
  6.         $this->booted true;
  7.         $this->fireAppCallbacks($this->bootedCallbacks);
  8.     }
  1.      * @param  \Illuminate\Contracts\Foundation\Application  $app
  2.      * @return void
  3.      */
  4.     public function bootstrap(Application $app)
  5.     {
  6.         $app->boot();
  7.     }
  8. }
  1.         $this->hasBeenBootstrapped true;
  2.         foreach ($bootstrappers as $bootstrapper) {
  3.             $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
  4.             $this->make($bootstrapper)->bootstrap($this);
  5.             $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
  6.         }
  7.     }
  1.      * @return void
  2.      */
  3.     public function bootstrap()
  4.     {
  5.         if (! $this->app->hasBeenBootstrapped()) {
  6.             $this->app->bootstrapWith($this->bootstrappers());
  7.         }
  8.     }
  9.     /**
  10.      * Get the route dispatcher callback.
  1.     {
  2.         $this->app->instance('request'$request);
  3.         Facade::clearResolvedInstance('request');
  4.         $this->bootstrap();
  5.         return (new Pipeline($this->app))
  6.                     ->send($request)
  7.                     ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  8.                     ->then($this->dispatchToRouter());
  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. $kernel $app->make(Illuminate\Contracts\Http\Kernel::class);
  3. $response $kernel->handle(
  4.     $request Illuminate\Http\Request::capture()
  5. );
  6. $response->send();
  7. $kernel->terminate($request$response);

Stack Traces 3

[3/3] QueryException
Illuminate\Database\QueryException:
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `settings`)

  at /var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
  at Illuminate\Database\Connection->runQueryCallback()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:899)
  at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:879)
  at Illuminate\Database\Connection->handleQueryException()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:723)
  at Illuminate\Database\Connection->run()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:422)
  at Illuminate\Database\Connection->select()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2656)
  at Illuminate\Database\Query\Builder->runSelect()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2644)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3180)
  at Illuminate\Database\Query\Builder->onceWithColumns()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2645)
  at Illuminate\Database\Query\Builder->get()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:710)
  at Illuminate\Database\Eloquent\Builder->getModels()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:694)
  at Illuminate\Database\Eloquent\Builder->get()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:674)
  at Illuminate\Database\Eloquent\Model::all()
     (/var/www/zapdv.ru/public_html/app/Providers/SettingServiceProvider.php:41)
  at App\Providers\SettingServiceProvider->boot()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php:41)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:661)
  at Illuminate\Container\Container->call()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:929)
  at Illuminate\Foundation\Application->bootProvider()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:910)
  at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
  at array_walk()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:911)
  at Illuminate\Foundation\Application->boot()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
  at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:242)
  at Illuminate\Foundation\Application->bootstrapWith()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176)
  at Illuminate\Foundation\Http\Kernel->bootstrap()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:160)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:134)
  at Illuminate\Foundation\Http\Kernel->handle()
     (/var/www/zapdv.ru/public_html/public/index.php:55)                
[2/3] Exception
Doctrine\DBAL\Driver\PDO\Exception:
SQLSTATE[HY000] [2002] Connection refused

  at /var/www/zapdv.ru/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
  at Doctrine\DBAL\Driver\PDO\Exception::new()
     (/var/www/zapdv.ru/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:44)
  at Doctrine\DBAL\Driver\PDOConnection->__construct()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:67)
  at Illuminate\Database\Connectors\Connector->createPdoConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:100)
  at Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:50)
  at Illuminate\Database\Connectors\Connector->createConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24)
  at Illuminate\Database\Connectors\MySqlConnector->connect()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:184)
  at Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}()
  at call_user_func()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1181)
  at Illuminate\Database\Connection->getPdo()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1217)
  at Illuminate\Database\Connection->getReadPdo()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:486)
  at Illuminate\Database\Connection->getPdoForSelect()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414)
  at Illuminate\Database\Connection->Illuminate\Database\{closure}()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:753)
  at Illuminate\Database\Connection->runQueryCallback()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:899)
  at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:879)
  at Illuminate\Database\Connection->handleQueryException()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:723)
  at Illuminate\Database\Connection->run()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:422)
  at Illuminate\Database\Connection->select()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2656)
  at Illuminate\Database\Query\Builder->runSelect()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2644)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3180)
  at Illuminate\Database\Query\Builder->onceWithColumns()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2645)
  at Illuminate\Database\Query\Builder->get()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:710)
  at Illuminate\Database\Eloquent\Builder->getModels()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:694)
  at Illuminate\Database\Eloquent\Builder->get()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:674)
  at Illuminate\Database\Eloquent\Model::all()
     (/var/www/zapdv.ru/public_html/app/Providers/SettingServiceProvider.php:41)
  at App\Providers\SettingServiceProvider->boot()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php:41)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:661)
  at Illuminate\Container\Container->call()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:929)
  at Illuminate\Foundation\Application->bootProvider()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:910)
  at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
  at array_walk()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:911)
  at Illuminate\Foundation\Application->boot()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
  at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:242)
  at Illuminate\Foundation\Application->bootstrapWith()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176)
  at Illuminate\Foundation\Http\Kernel->bootstrap()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:160)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:134)
  at Illuminate\Foundation\Http\Kernel->handle()
     (/var/www/zapdv.ru/public_html/public/index.php:55)                
[1/3] PDOException
PDOException:
SQLSTATE[HY000] [2002] Connection refused

  at /var/www/zapdv.ru/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
  at PDO->__construct()
     (/var/www/zapdv.ru/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40)
  at Doctrine\DBAL\Driver\PDOConnection->__construct()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:67)
  at Illuminate\Database\Connectors\Connector->createPdoConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:100)
  at Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:50)
  at Illuminate\Database\Connectors\Connector->createConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24)
  at Illuminate\Database\Connectors\MySqlConnector->connect()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:184)
  at Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}()
  at call_user_func()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1181)
  at Illuminate\Database\Connection->getPdo()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1217)
  at Illuminate\Database\Connection->getReadPdo()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:486)
  at Illuminate\Database\Connection->getPdoForSelect()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414)
  at Illuminate\Database\Connection->Illuminate\Database\{closure}()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:753)
  at Illuminate\Database\Connection->runQueryCallback()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:899)
  at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:879)
  at Illuminate\Database\Connection->handleQueryException()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:723)
  at Illuminate\Database\Connection->run()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:422)
  at Illuminate\Database\Connection->select()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2656)
  at Illuminate\Database\Query\Builder->runSelect()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2644)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3180)
  at Illuminate\Database\Query\Builder->onceWithColumns()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2645)
  at Illuminate\Database\Query\Builder->get()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:710)
  at Illuminate\Database\Eloquent\Builder->getModels()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:694)
  at Illuminate\Database\Eloquent\Builder->get()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:674)
  at Illuminate\Database\Eloquent\Model::all()
     (/var/www/zapdv.ru/public_html/app/Providers/SettingServiceProvider.php:41)
  at App\Providers\SettingServiceProvider->boot()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php:41)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:661)
  at Illuminate\Container\Container->call()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:929)
  at Illuminate\Foundation\Application->bootProvider()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:910)
  at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
  at array_walk()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:911)
  at Illuminate\Foundation\Application->boot()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
  at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:242)
  at Illuminate\Foundation\Application->bootstrapWith()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176)
  at Illuminate\Foundation\Http\Kernel->bootstrap()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:160)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
     (/var/www/zapdv.ru/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:134)
  at Illuminate\Foundation\Http\Kernel->handle()
     (/var/www/zapdv.ru/public_html/public/index.php:55)