Symfony Exception

PDOException QueryException

HTTP 500 Internal Server Error

SQLSTATE[HY000] [2002] Connection refused (SQL: select `id`, `title`, `slug` from `category` where `is_blog` = 1)

Exceptions 2

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.      * @param array $columns
  2.      * @return \Illuminate\Support\Collection
  3.      */
  4.     public function get($columns = ['*'])
  5.     {
  6.         $items parent::get($columns);
  7.         if (!$this->groupLimit) {
  8.             return $items;
  9.         }
  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.      */
  2.     public function boot()
  3.     {
  4.         Paginator::useBootstrap();
  5.         $blogCategories Category::where("is_blog"1)->select('id''title''slug')->get();
  6.         $countries Country::orderBy('country_name','asc')->select('id','country_name','phone_code','shortcode','image')->get();
  7.         View::share(
  8.             array(
  9.                 'blogCategories' => $blogCategories,
  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  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $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.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  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}(object(AppServiceProvider), 32)
  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.     public function handle($request)
  2.     {
  3.         try {
  4.             $request->enableHttpMethodParameterOverride();
  5.             $response $this->sendRequestThroughRouter($request);
  6.         } catch (Throwable $e) {
  7.             $this->reportException($e);
  8.             $response $this->renderException($request$e);
  9.         }
Kernel->handle(object(Request)) in /home/bbzltd/public_html/public/index.php (line 52)
  1. $app = require_once __DIR__.'/../bootstrap/app.php';
  2. $kernel $app->make(Kernel::class);
  3. $response $kernel->handle(
  4.     $request Request::capture()
  5. )->send();
  6. $kernel->terminate($request$response);

PDOException

SQLSTATE[HY000] [2002] Connection refused

  1.     {
  2.         if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
  3.             return new PDOConnection($dsn$username$password$options);
  4.         }
  5.         return new PDO($dsn$username$password$options);
  6.     }
  7.     /**
  8.      * Determine if the connection is persistent.
  9.      *
  1.     {
  2.         if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
  3.             return new PDOConnection($dsn$username$password$options);
  4.         }
  5.         return new PDO($dsn$username$password$options);
  6.     }
  7.     /**
  8.      * Determine if the connection is persistent.
  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($hosts $this->parseHosts($config)) as $key => $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.      * @param array $columns
  2.      * @return \Illuminate\Support\Collection
  3.      */
  4.     public function get($columns = ['*'])
  5.     {
  6.         $items parent::get($columns);
  7.         if (!$this->groupLimit) {
  8.             return $items;
  9.         }
  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.      */
  2.     public function boot()
  3.     {
  4.         Paginator::useBootstrap();
  5.         $blogCategories Category::where("is_blog"1)->select('id''title''slug')->get();
  6.         $countries Country::orderBy('country_name','asc')->select('id','country_name','phone_code','shortcode','image')->get();
  7.         View::share(
  8.             array(
  9.                 'blogCategories' => $blogCategories,
  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  $value
  2.      * @return mixed
  3.      */
  4.     public static function unwrapIfClosure($value)
  5.     {
  6.         return $value instanceof Closure $value() : $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.      *
  2.      * @throws \InvalidArgumentException
  3.      */
  4.     public function call($callback, array $parameters = [], $defaultMethod null)
  5.     {
  6.         return BoundMethod::call($this$callback$parameters$defaultMethod);
  7.     }
  8.     /**
  9.      * Get a closure to resolve the given type from the container.
  10.      *
  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}(object(AppServiceProvider), 32)
  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.     public function handle($request)
  2.     {
  3.         try {
  4.             $request->enableHttpMethodParameterOverride();
  5.             $response $this->sendRequestThroughRouter($request);
  6.         } catch (Throwable $e) {
  7.             $this->reportException($e);
  8.             $response $this->renderException($request$e);
  9.         }
Kernel->handle(object(Request)) in /home/bbzltd/public_html/public/index.php (line 52)
  1. $app = require_once __DIR__.'/../bootstrap/app.php';
  2. $kernel $app->make(Kernel::class);
  3. $response $kernel->handle(
  4.     $request Request::capture()
  5. )->send();
  6. $kernel->terminate($request$response);

Stack Traces 2

[2/2] QueryException
Illuminate\Database\QueryException:
SQLSTATE[HY000] [2002] Connection refused (SQL: select `id`, `title`, `slug` from `category` where `is_blog` = 1)

  at /home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
  at Illuminate\Database\Connection->runQueryCallback('select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:784)
  at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection(object(QueryException), 'select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:764)
  at Illuminate\Database\Connection->handleQueryException(object(QueryException), 'select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:675)
  at Illuminate\Database\Connection->run('select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:376)
  at Illuminate\Database\Connection->select('select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), true)
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2414)
  at Illuminate\Database\Query\Builder->runSelect()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2402)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2936)
  at Illuminate\Database\Query\Builder->onceWithColumns(array('*'), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2403)
  at Illuminate\Database\Query\Builder->get(array('*'))
     (/home/bbzltd/public_html/vendor/staudenmeir/eloquent-eager-limit/src/Builder.php:40)
  at Staudenmeir\EloquentEagerLimit\Builder->get(array('*'))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:625)
  at Illuminate\Database\Eloquent\Builder->getModels(array('*'))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:609)
  at Illuminate\Database\Eloquent\Builder->get()
     (/home/bbzltd/public_html/app/Providers/AppServiceProvider.php:36)
  at App\Providers\AppServiceProvider->boot()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure(object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod(object(Application), array(object(AppServiceProvider), 'boot'), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call(object(Application), array(object(AppServiceProvider), 'boot'), array(), null)
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:653)
  at Illuminate\Container\Container->call(array(object(AppServiceProvider), 'boot'))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:924)
  at Illuminate\Foundation\Application->bootProvider(object(AppServiceProvider))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:905)
  at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(object(AppServiceProvider), 32)
  at array_walk(array(object(EventServiceProvider), object(LogServiceProvider), object(RoutingServiceProvider), object(AuthServiceProvider), object(CookieServiceProvider), object(DatabaseServiceProvider), object(EncryptionServiceProvider), object(FilesystemServiceProvider), object(FormRequestServiceProvider), object(ParallelTestingServiceProvider), object(FoundationServiceProvider), object(NotificationServiceProvider), object(PaginationServiceProvider), object(SessionServiceProvider), object(ViewServiceProvider), object(ServiceProvider), object(ServiceProvider), object(CorsServiceProvider), object(ImageServiceProvider), object(AgentServiceProvider), object(AdminLteServiceProvider), object(SanctumServiceProvider), object(UiServiceProvider), object(ExcelServiceProvider), object(ServiceProvider), object(ServiceProvider), object(ChunkUploadServiceProvider), object(PermissionServiceProvider), object(PayPalServiceProvider), object(LocationServiceProvider), object(LaravelServiceProvider), object(HashidsServiceProvider), object(AppServiceProvider), object(AuthServiceProvider), object(EventServiceProvider), object(RouteServiceProvider), object(CacheServiceProvider)), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:906)
  at Illuminate\Foundation\Application->boot()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
  at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(object(Application))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:237)
  at Illuminate\Foundation\Application->bootstrapWith(array('Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables', 'Illuminate\\Foundation\\Bootstrap\\LoadConfiguration', 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions', 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades', 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders', 'Illuminate\\Foundation\\Bootstrap\\BootProviders'))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:153)
  at Illuminate\Foundation\Http\Kernel->bootstrap()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:137)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(object(Request))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:111)
  at Illuminate\Foundation\Http\Kernel->handle(object(Request))
     (/home/bbzltd/public_html/public/index.php:52)                
[1/2] PDOException
PDOException:
SQLSTATE[HY000] [2002] Connection refused

  at /home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
  at PDO->__construct('mysql:host=127.0.0.1;port=3306;dbname=bbzltd_propcoin_bebuzee', 'bbzltd_propcoin_bebuzee', '&HH]zdcPMROA', array(0, 2, 0, false, false))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70)
  at Illuminate\Database\Connectors\Connector->createPdoConnection('mysql:host=127.0.0.1;port=3306;dbname=bbzltd_propcoin_bebuzee', 'bbzltd_propcoin_bebuzee', '&HH]zdcPMROA', array(0, 2, 0, false, false))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:100)
  at Illuminate\Database\Connectors\Connector->tryAgainIfCausedByLostConnection(object(PDOException), 'mysql:host=127.0.0.1;port=3306;dbname=bbzltd_propcoin_bebuzee', 'bbzltd_propcoin_bebuzee', '&HH]zdcPMROA', array(0, 2, 0, false, false))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:50)
  at Illuminate\Database\Connectors\Connector->createConnection('mysql:host=127.0.0.1;port=3306;dbname=bbzltd_propcoin_bebuzee', array('driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '3306', 'database' => 'bbzltd_propcoin_bebuzee', 'username' => 'bbzltd_propcoin_bebuzee', 'password' => '&HH]zdcPMROA', 'unix_socket' => '', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, 'strict' => false, 'engine' => null, 'options' => array(), 'name' => 'mysql'), array(0, 2, 0, false, false))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24)
  at Illuminate\Database\Connectors\MySqlConnector->connect(array('driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '3306', 'database' => 'bbzltd_propcoin_bebuzee', 'username' => 'bbzltd_propcoin_bebuzee', 'password' => '&HH]zdcPMROA', 'unix_socket' => '', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'prefix_indexes' => true, 'strict' => false, 'engine' => null, 'options' => array(), 'name' => 'mysql'))
     (/home/bbzltd/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(object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1064)
  at Illuminate\Database\Connection->getPdo()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:1100)
  at Illuminate\Database\Connection->getReadPdo()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:442)
  at Illuminate\Database\Connection->getPdoForSelect(true)
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368)
  at Illuminate\Database\Connection->Illuminate\Database\{closure}('select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:705)
  at Illuminate\Database\Connection->runQueryCallback('select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:784)
  at Illuminate\Database\Connection->tryAgainIfCausedByLostConnection(object(QueryException), 'select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:764)
  at Illuminate\Database\Connection->handleQueryException(object(QueryException), 'select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:675)
  at Illuminate\Database\Connection->run('select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:376)
  at Illuminate\Database\Connection->select('select `id`, `title`, `slug` from `category` where `is_blog` = ?', array(1), true)
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2414)
  at Illuminate\Database\Query\Builder->runSelect()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2402)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2936)
  at Illuminate\Database\Query\Builder->onceWithColumns(array('*'), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2403)
  at Illuminate\Database\Query\Builder->get(array('*'))
     (/home/bbzltd/public_html/vendor/staudenmeir/eloquent-eager-limit/src/Builder.php:40)
  at Staudenmeir\EloquentEagerLimit\Builder->get(array('*'))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:625)
  at Illuminate\Database\Eloquent\Builder->getModels(array('*'))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:609)
  at Illuminate\Database\Eloquent\Builder->get()
     (/home/bbzltd/public_html/app/Providers/AppServiceProvider.php:36)
  at App\Providers\AppServiceProvider->boot()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure(object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod(object(Application), array(object(AppServiceProvider), 'boot'), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call(object(Application), array(object(AppServiceProvider), 'boot'), array(), null)
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:653)
  at Illuminate\Container\Container->call(array(object(AppServiceProvider), 'boot'))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:924)
  at Illuminate\Foundation\Application->bootProvider(object(AppServiceProvider))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:905)
  at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(object(AppServiceProvider), 32)
  at array_walk(array(object(EventServiceProvider), object(LogServiceProvider), object(RoutingServiceProvider), object(AuthServiceProvider), object(CookieServiceProvider), object(DatabaseServiceProvider), object(EncryptionServiceProvider), object(FilesystemServiceProvider), object(FormRequestServiceProvider), object(ParallelTestingServiceProvider), object(FoundationServiceProvider), object(NotificationServiceProvider), object(PaginationServiceProvider), object(SessionServiceProvider), object(ViewServiceProvider), object(ServiceProvider), object(ServiceProvider), object(CorsServiceProvider), object(ImageServiceProvider), object(AgentServiceProvider), object(AdminLteServiceProvider), object(SanctumServiceProvider), object(UiServiceProvider), object(ExcelServiceProvider), object(ServiceProvider), object(ServiceProvider), object(ChunkUploadServiceProvider), object(PermissionServiceProvider), object(PayPalServiceProvider), object(LocationServiceProvider), object(LaravelServiceProvider), object(HashidsServiceProvider), object(AppServiceProvider), object(AuthServiceProvider), object(EventServiceProvider), object(RouteServiceProvider), object(CacheServiceProvider)), object(Closure))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:906)
  at Illuminate\Foundation\Application->boot()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
  at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(object(Application))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:237)
  at Illuminate\Foundation\Application->bootstrapWith(array('Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables', 'Illuminate\\Foundation\\Bootstrap\\LoadConfiguration', 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions', 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades', 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders', 'Illuminate\\Foundation\\Bootstrap\\BootProviders'))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:153)
  at Illuminate\Foundation\Http\Kernel->bootstrap()
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:137)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(object(Request))
     (/home/bbzltd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:111)
  at Illuminate\Foundation\Http\Kernel->handle(object(Request))
     (/home/bbzltd/public_html/public/index.php:52)