a:4:{s:6:"_token";s:40:"VkUeX7wcKFdxyCXqTIGmmn8QpDyhYHlqqXaaxHDz";s:15:"current_site_id";s:6:"master";s:9:"_previous";a:1:{s:3:"url";s:25:"http://180.80.193.25:8090";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}a:4:{s:6:"_token";s:40:"VkUeX7wcKFdxyCXqTIGmmn8QpDyhYHlqqXaaxHDz";s:15:"current_site_id";s:6:"master";s:9:"_previous";a:1:{s:3:"url";s:25:"http://180.80.193.25:8090";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}} SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'mw_user'@'172.29.0.2' for table `mw_tenant_12`.`sucess_co__media_thumbnails` (Connection: tenant, SQL: select * from `sucess_co__media_thumbnails` where `uuid` = a14b9805-8fef-45ce-9384-6d468e90967d limit 1) (500 Internal Server Error)

Symfony Exception

PDOException QueryException

HTTP 500 Internal Server Error

SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'mw_user'@'172.29.0.2' for table `mw_tenant_12`.`sucess_co__media_thumbnails` (Connection: tenant, SQL: select * from `sucess_co__media_thumbnails` where `uuid` = a14b9805-8fef-45ce-9384-6d468e90967d limit 1)

Exceptions 2

Illuminate\Database\ QueryException

Show exception properties
Illuminate\Database\QueryException {#3572
  +errorInfo: array:3 [
    0 => "42000"
    1 => 1142
    2 => "SELECT command denied to user 'mw_user'@'172.29.0.2' for table `mw_tenant_12`.`sucess_co__media_thumbnails`"
  ]
  +connectionName: "tenant"
  #sql: "select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1"
  #bindings: array:1 [
    0 => "a14b9805-8fef-45ce-9384-6d468e90967d"
  ]
}
  1.                 throw new UniqueConstraintViolationException(
  2.                     $this->getName(), $query, $this->prepareBindings($bindings), $e
  3.                 );
  4.             }
  5.             throw new QueryException(
  6.                 $this->getName(), $query, $this->prepareBindings($bindings), $e
  7.             );
  8.         }
  9.     }
  1.         // Here we will run this query. If an exception occurs we'll determine if it was
  2.         // caused by a connection that has been lost. If that is the cause, we'll try
  3.         // to re-establish connection and re-run the query with a fresh connection.
  4.         try {
  5.             $result = $this->runQueryCallback($query, $bindings, $callback);
  6.         } catch (QueryException $e) {
  7.             $result = $this->handleQueryException(
  8.                 $e, $query, $bindings, $callback
  9.             );
  10.         }
  1.      * @param  bool  $useReadPdo
  2.      * @return array
  3.      */
  4.     public function select($query, $bindings = [], $useReadPdo = true)
  5.     {
  6.         return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
  7.             if ($this->pretending()) {
  8.                 return [];
  9.             }
  10.             // For select statements, we'll simply execute the query and return an array
  1.      *
  2.      * @return array
  3.      */
  4.     protected function runSelect()
  5.     {
  6.         return $this->connection->select(
  7.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8.         );
  9.     }
  10.     /**
  1.      * @return \Illuminate\Support\Collection
  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.      * @param  array|string  $columns
  2.      * @return \Illuminate\Support\Collection
  3.      */
  4.     public function get($columns = ['*'])
  5.     {
  6.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  7.             return $this->processor->processSelect($this, $this->runSelect());
  8.         }));
  9.     }
  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.         $collection = $builder->getModel()->newCollection($models);
  1.      * @param  array|string  $columns
  2.      * @return \Illuminate\Database\Eloquent\Model|object|static|null
  3.      */
  4.     public function first($columns = ['*'])
  5.     {
  6.         return $this->take(1)->get($columns)->first();
  7.     }
  8.     /**
  9.      * Execute the query and get the first result if it's the sole matching record.
  10.      *
  1. \Illuminate\Support\Facades\Route::get('/api/image-generate-tn-request/{cache_id}', function ($mediaId) {
  2.     $mediaId = str_replace('..', '', $mediaId);
  3.     $check = \MicroweberPackages\Media\Models\MediaThumbnail::where('uuid', $mediaId)->first();
  4.     if ($check) {
  5.         $opts = $check->image_options;
  6.         $opts = app()->url_manager->replace_site_url_back($opts);
  7.         $cache_id_data_json = $opts;
  1.      * @param  callable  $callable
  2.      * @return mixed
  3.      */
  4.     public function dispatch(Route $route, $callable)
  5.     {
  6.         return $callable(...array_values($this->resolveParameters($route, $callable)));
  7.     }
  8.     /**
  9.      * Resolve the parameters for the callable.
  10.      *
  1.         if ($this->isSerializedClosure()) {
  2.             $callable = unserialize($this->action['uses'])->getClosure();
  3.         }
  4.         return $this->container[CallableDispatcher::class]->dispatch($this, $callable);
  5.     }
  6.     /**
  7.      * Determine if the route action is a serialized Closure.
  8.      *
  1.         try {
  2.             if ($this->isControllerAction()) {
  3.                 return $this->runController();
  4.             }
  5.             return $this->runCallable();
  6.         } catch (HttpResponseException $e) {
  7.             return $e->getResponse();
  8.         }
  9.     }
  1.         return (new Pipeline($this->container))
  2.                         ->send($request)
  3.                         ->through($middleware)
  4.                         ->then(fn ($request) => $this->prepareResponse(
  5.                             $request, $route->run()
  6.                         ));
  7.     }
  8.     /**
  9.      * Gather the middleware for the given route with resolved class names.
  1.      */
  2.     protected function prepareDestination(Closure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable, $e);
  9.             }
  10.         };
  11.     }
  1.     {
  2.         $pipeline = array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.         $middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
  2.         return (new Pipeline($this->container))
  3.                         ->send($request)
  4.                         ->through($middleware)
  5.                         ->then(fn ($request) => $this->prepareResponse(
  6.                             $request, $route->run()
  7.                         ));
  8.     }
  9.     /**
  1.         $request->setRouteResolver(fn () => $route);
  2.         $this->events->dispatch(new RouteMatched($route, $request));
  3.         return $this->prepareResponse($request,
  4.             $this->runRouteWithinStack($route, $request)
  5.         );
  6.     }
  7.     /**
  8.      * Run the given route within a Stack "onion" instance.
  1.      * @param  \Illuminate\Http\Request  $request
  2.      * @return \Symfony\Component\HttpFoundation\Response
  3.      */
  4.     public function dispatchToRoute(Request $request)
  5.     {
  6.         return $this->runRoute($request, $this->findRoute($request));
  7.     }
  8.     /**
  9.      * Find the route matching a given request.
  10.      *
  1.      */
  2.     public function dispatch(Request $request)
  3.     {
  4.         $this->currentRequest = $request;
  5.         return $this->dispatchToRoute($request);
  6.     }
  7.     /**
  8.      * Dispatch the request to a route and return the response.
  9.      *
  1.     protected function dispatchToRouter()
  2.     {
  3.         return function ($request) {
  4.             $this->app->instance('request', $request);
  5.             return $this->router->dispatch($request);
  6.         };
  7.     }
  8.     /**
  9.      * Call the terminate method on any terminable middleware.
in /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php -> Illuminate\Foundation\Http\{closure} (line 141)
  1.      */
  2.     protected function prepareDestination(Closure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable, $e);
  9.             }
  10.         };
  11.     }
Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in /var/www/html/userfiles/modules/onebuild_saas/src/Http/Middleware/TenantIdentify.php (line 116)
  1.             }
  2.         } catch (\Exception $e) {
  3.             Log::error("[TenantIdentify Middleware] Failed to switch tenant DB. Error: " . $e->getMessage());
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      * @return mixed
  2.      */
  3.     public function handle($request, Closure $next)
  4.     {
  5.         if (!$this->debugbar->isEnabled() || $this->inExceptArray($request)) {
  6.             return $next($request);
  7.         }
  8.         $this->debugbar->boot();
  9.         try {
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
in /var/www/html/vendor/livewire/livewire/src/DisableBrowserCache.php -> Illuminate\Pipeline\{closure} (line 19)
  1.      * @param  \Closure  $next
  2.      * @return mixed
  3.      */
  4.     public function handle($request, Closure $next)
  5.     {
  6.         $response = $next($request);
  7.         if ($response instanceof Response && Livewire::shouldDisableBackButtonCache()){
  8.             $response->headers->add([
  9.                 "Pragma" => "no-cache",
  10.                 "Expires" => "Fri, 01 Jan 1990 00:00:00 GMT",
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.     {
  2.         $request::setTrustedProxies([], $this->getTrustedHeaderNames());
  3.         $this->setTrustedProxyIpAddresses($request);
  4.         return $next($request);
  5.     }
  6.     /**
  7.      * Sets the trusted proxies on the request.
  8.      *
TrustProxies->handle(object(Request), object(Closure)) in /var/www/html/src/MicroweberPackages/App/Http/Middleware/TrustProxies.php (line 42)
  1.                 }
  2.             }
  3.             if($proxy_ips) {
  4.                 $this->proxies = $proxy_ips;
  5.             }
  6.             return parent::handle($request, $next);
  7.         }
  8.         return parent::handle($request, $next);
  9.     }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      */
  2.     public function handle($request, Closure $next)
  3.     {
  4.         // Check if we're dealing with CORS and if we should handle it
  5.         if (! $this->shouldRun($request)) {
  6.             return $next($request);
  7.         }
  8.         // For Preflight, return the Preflight response
  9.         if ($this->cors->isPreflightRequest($request)) {
  10.             $response = $this->cors->handlePreflightRequest($request);
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.                 null,
  2.                 $this->getHeaders($data)
  3.             );
  4.         }
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Determine if the incoming request has a maintenance mode bypass cookie.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.         if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
  2.             throw new PostTooLargeException;
  3.         }
  4.         return $next($request);
  5.     }
  6.     /**
  7.      * Determine the server 'post_max_size' as bytes.
  8.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      */
  2.     public function handle($request, Closure $next)
  3.     {
  4.         $this->clean($request);
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Clean the request's data.
  9.      *
  1.             if ($callback($request)) {
  2.                 return $next($request);
  3.             }
  4.         }
  5.         return parent::handle($request, $next);
  6.     }
  7.     /**
  8.      * Transform the given value.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.             $this->startSession($request, $session)
  2.         );
  3.         $this->collectGarbage($session);
  4.         $response = $next($request);
  5.         $this->storeCurrentUrl($request, $session);
  6.         $this->addCookieToResponse($response, $session);
  1.         if ($this->manager->shouldBlock() ||
  2.             ($request->route() instanceof Route && $request->route()->locksFor())) {
  3.             return $this->handleRequestWhileBlocking($request, $session, $next);
  4.         }
  5.         return $this->handleStatefulRequest($request, $session, $next);
  6.     }
  7.     /**
  8.      * Handle the given request within session state.
  9.      *
StartSession->handle(object(Request), object(Closure)) in /var/www/html/src/MicroweberPackages/App/Http/Middleware/StartSessionExtended.php (line 22)
  1.      * @param  \Closure $next
  2.      * @return mixed
  3.      */
  4.     public function handle($request, Closure $next)
  5.     {
  6.         return parent::handle($request, $next); // defer to the right stuff
  7.     }
  8.     /**
  9.      * Store the current URL for the request if necessary.
  10.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      */
  2.     public function handle($request, Closure $next)
  3.     {
  4.         $this->clean($request);
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Clean the request's data.
  9.      *
  1.             if ($callback($request)) {
  2.                 return $next($request);
  3.             }
  4.         }
  5.         return parent::handle($request, $next);
  6.     }
  7.     /**
  8.      * Transform the given value.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      * @param  \Closure  $next
  2.      * @return mixed
  3.      */
  4.     public function handle($request, Closure $next)
  5.     {
  6.         $response = $next($request);
  7.         foreach ($this->cookies->getQueuedCookies() as $cookie) {
  8.             $response->headers->setCookie($cookie);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.     {
  2.         $pipeline = array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.         $this->bootstrap();
  2.         return (new Pipeline($this->app))
  3.                     ->send($request)
  4.                     ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  5.                     ->then($this->dispatchToRouter());
  6.     }
  7.     /**
  8.      * Bootstrap the application for HTTP requests.
  9.      *
  1.         $this->requestStartedAt = Carbon::now();
  2.         try {
  3.             $request->enableHttpMethodParameterOverride();
  4.             $response = $this->sendRequestThroughRouter($request);
  5.         } catch (Throwable $e) {
  6.             $this->reportException($e);
  7.             $response = $this->renderException($request, $e);
  8.         }
Kernel->handle(object(Request)) in /var/www/html/index.php (line 97)
  1. |
  2. */
  3. $kernel = $app->make('Illuminate\Contracts\Http\Kernel');
  4. $response = $kernel->handle(
  5.     $request = Illuminate\Http\Request::capture()
  6. );
  7. $response->send();

PDOException

SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'mw_user'@'172.29.0.2' for table `mw_tenant_12`.`sucess_co__media_thumbnails`

  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.             // 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.         // Here we will run this query. If an exception occurs we'll determine if it was
  2.         // caused by a connection that has been lost. If that is the cause, we'll try
  3.         // to re-establish connection and re-run the query with a fresh connection.
  4.         try {
  5.             $result = $this->runQueryCallback($query, $bindings, $callback);
  6.         } catch (QueryException $e) {
  7.             $result = $this->handleQueryException(
  8.                 $e, $query, $bindings, $callback
  9.             );
  10.         }
  1.      * @param  bool  $useReadPdo
  2.      * @return array
  3.      */
  4.     public function select($query, $bindings = [], $useReadPdo = true)
  5.     {
  6.         return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
  7.             if ($this->pretending()) {
  8.                 return [];
  9.             }
  10.             // For select statements, we'll simply execute the query and return an array
  1.      *
  2.      * @return array
  3.      */
  4.     protected function runSelect()
  5.     {
  6.         return $this->connection->select(
  7.             $this->toSql(), $this->getBindings(), ! $this->useWritePdo
  8.         );
  9.     }
  10.     /**
  1.      * @return \Illuminate\Support\Collection
  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.      * @param  array|string  $columns
  2.      * @return \Illuminate\Support\Collection
  3.      */
  4.     public function get($columns = ['*'])
  5.     {
  6.         return collect($this->onceWithColumns(Arr::wrap($columns), function () {
  7.             return $this->processor->processSelect($this, $this->runSelect());
  8.         }));
  9.     }
  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.         $collection = $builder->getModel()->newCollection($models);
  1.      * @param  array|string  $columns
  2.      * @return \Illuminate\Database\Eloquent\Model|object|static|null
  3.      */
  4.     public function first($columns = ['*'])
  5.     {
  6.         return $this->take(1)->get($columns)->first();
  7.     }
  8.     /**
  9.      * Execute the query and get the first result if it's the sole matching record.
  10.      *
  1. \Illuminate\Support\Facades\Route::get('/api/image-generate-tn-request/{cache_id}', function ($mediaId) {
  2.     $mediaId = str_replace('..', '', $mediaId);
  3.     $check = \MicroweberPackages\Media\Models\MediaThumbnail::where('uuid', $mediaId)->first();
  4.     if ($check) {
  5.         $opts = $check->image_options;
  6.         $opts = app()->url_manager->replace_site_url_back($opts);
  7.         $cache_id_data_json = $opts;
  1.      * @param  callable  $callable
  2.      * @return mixed
  3.      */
  4.     public function dispatch(Route $route, $callable)
  5.     {
  6.         return $callable(...array_values($this->resolveParameters($route, $callable)));
  7.     }
  8.     /**
  9.      * Resolve the parameters for the callable.
  10.      *
  1.         if ($this->isSerializedClosure()) {
  2.             $callable = unserialize($this->action['uses'])->getClosure();
  3.         }
  4.         return $this->container[CallableDispatcher::class]->dispatch($this, $callable);
  5.     }
  6.     /**
  7.      * Determine if the route action is a serialized Closure.
  8.      *
  1.         try {
  2.             if ($this->isControllerAction()) {
  3.                 return $this->runController();
  4.             }
  5.             return $this->runCallable();
  6.         } catch (HttpResponseException $e) {
  7.             return $e->getResponse();
  8.         }
  9.     }
  1.         return (new Pipeline($this->container))
  2.                         ->send($request)
  3.                         ->through($middleware)
  4.                         ->then(fn ($request) => $this->prepareResponse(
  5.                             $request, $route->run()
  6.                         ));
  7.     }
  8.     /**
  9.      * Gather the middleware for the given route with resolved class names.
  1.      */
  2.     protected function prepareDestination(Closure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable, $e);
  9.             }
  10.         };
  11.     }
  1.     {
  2.         $pipeline = array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.         $middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
  2.         return (new Pipeline($this->container))
  3.                         ->send($request)
  4.                         ->through($middleware)
  5.                         ->then(fn ($request) => $this->prepareResponse(
  6.                             $request, $route->run()
  7.                         ));
  8.     }
  9.     /**
  1.         $request->setRouteResolver(fn () => $route);
  2.         $this->events->dispatch(new RouteMatched($route, $request));
  3.         return $this->prepareResponse($request,
  4.             $this->runRouteWithinStack($route, $request)
  5.         );
  6.     }
  7.     /**
  8.      * Run the given route within a Stack "onion" instance.
  1.      * @param  \Illuminate\Http\Request  $request
  2.      * @return \Symfony\Component\HttpFoundation\Response
  3.      */
  4.     public function dispatchToRoute(Request $request)
  5.     {
  6.         return $this->runRoute($request, $this->findRoute($request));
  7.     }
  8.     /**
  9.      * Find the route matching a given request.
  10.      *
  1.      */
  2.     public function dispatch(Request $request)
  3.     {
  4.         $this->currentRequest = $request;
  5.         return $this->dispatchToRoute($request);
  6.     }
  7.     /**
  8.      * Dispatch the request to a route and return the response.
  9.      *
  1.     protected function dispatchToRouter()
  2.     {
  3.         return function ($request) {
  4.             $this->app->instance('request', $request);
  5.             return $this->router->dispatch($request);
  6.         };
  7.     }
  8.     /**
  9.      * Call the terminate method on any terminable middleware.
in /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php -> Illuminate\Foundation\Http\{closure} (line 141)
  1.      */
  2.     protected function prepareDestination(Closure $destination)
  3.     {
  4.         return function ($passable) use ($destination) {
  5.             try {
  6.                 return $destination($passable);
  7.             } catch (Throwable $e) {
  8.                 return $this->handleException($passable, $e);
  9.             }
  10.         };
  11.     }
Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in /var/www/html/userfiles/modules/onebuild_saas/src/Http/Middleware/TenantIdentify.php (line 116)
  1.             }
  2.         } catch (\Exception $e) {
  3.             Log::error("[TenantIdentify Middleware] Failed to switch tenant DB. Error: " . $e->getMessage());
  4.         }
  5.         return $next($request);
  6.     }
  7. }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      * @return mixed
  2.      */
  3.     public function handle($request, Closure $next)
  4.     {
  5.         if (!$this->debugbar->isEnabled() || $this->inExceptArray($request)) {
  6.             return $next($request);
  7.         }
  8.         $this->debugbar->boot();
  9.         try {
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
in /var/www/html/vendor/livewire/livewire/src/DisableBrowserCache.php -> Illuminate\Pipeline\{closure} (line 19)
  1.      * @param  \Closure  $next
  2.      * @return mixed
  3.      */
  4.     public function handle($request, Closure $next)
  5.     {
  6.         $response = $next($request);
  7.         if ($response instanceof Response && Livewire::shouldDisableBackButtonCache()){
  8.             $response->headers->add([
  9.                 "Pragma" => "no-cache",
  10.                 "Expires" => "Fri, 01 Jan 1990 00:00:00 GMT",
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.     {
  2.         $request::setTrustedProxies([], $this->getTrustedHeaderNames());
  3.         $this->setTrustedProxyIpAddresses($request);
  4.         return $next($request);
  5.     }
  6.     /**
  7.      * Sets the trusted proxies on the request.
  8.      *
TrustProxies->handle(object(Request), object(Closure)) in /var/www/html/src/MicroweberPackages/App/Http/Middleware/TrustProxies.php (line 42)
  1.                 }
  2.             }
  3.             if($proxy_ips) {
  4.                 $this->proxies = $proxy_ips;
  5.             }
  6.             return parent::handle($request, $next);
  7.         }
  8.         return parent::handle($request, $next);
  9.     }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      */
  2.     public function handle($request, Closure $next)
  3.     {
  4.         // Check if we're dealing with CORS and if we should handle it
  5.         if (! $this->shouldRun($request)) {
  6.             return $next($request);
  7.         }
  8.         // For Preflight, return the Preflight response
  9.         if ($this->cors->isPreflightRequest($request)) {
  10.             $response = $this->cors->handlePreflightRequest($request);
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.                 null,
  2.                 $this->getHeaders($data)
  3.             );
  4.         }
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Determine if the incoming request has a maintenance mode bypass cookie.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.         if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
  2.             throw new PostTooLargeException;
  3.         }
  4.         return $next($request);
  5.     }
  6.     /**
  7.      * Determine the server 'post_max_size' as bytes.
  8.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      */
  2.     public function handle($request, Closure $next)
  3.     {
  4.         $this->clean($request);
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Clean the request's data.
  9.      *
  1.             if ($callback($request)) {
  2.                 return $next($request);
  3.             }
  4.         }
  5.         return parent::handle($request, $next);
  6.     }
  7.     /**
  8.      * Transform the given value.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.             $this->startSession($request, $session)
  2.         );
  3.         $this->collectGarbage($session);
  4.         $response = $next($request);
  5.         $this->storeCurrentUrl($request, $session);
  6.         $this->addCookieToResponse($response, $session);
  1.         if ($this->manager->shouldBlock() ||
  2.             ($request->route() instanceof Route && $request->route()->locksFor())) {
  3.             return $this->handleRequestWhileBlocking($request, $session, $next);
  4.         }
  5.         return $this->handleStatefulRequest($request, $session, $next);
  6.     }
  7.     /**
  8.      * Handle the given request within session state.
  9.      *
StartSession->handle(object(Request), object(Closure)) in /var/www/html/src/MicroweberPackages/App/Http/Middleware/StartSessionExtended.php (line 22)
  1.      * @param  \Closure $next
  2.      * @return mixed
  3.      */
  4.     public function handle($request, Closure $next)
  5.     {
  6.         return parent::handle($request, $next); // defer to the right stuff
  7.     }
  8.     /**
  9.      * Store the current URL for the request if necessary.
  10.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      */
  2.     public function handle($request, Closure $next)
  3.     {
  4.         $this->clean($request);
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Clean the request's data.
  9.      *
  1.             if ($callback($request)) {
  2.                 return $next($request);
  3.             }
  4.         }
  5.         return parent::handle($request, $next);
  6.     }
  7.     /**
  8.      * Transform the given value.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.      * @param  \Closure  $next
  2.      * @return mixed
  3.      */
  4.     public function handle($request, Closure $next)
  5.     {
  6.         $response = $next($request);
  7.         foreach ($this->cookies->getQueuedCookies() as $cookie) {
  8.             $response->headers->setCookie($cookie);
  9.         }
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable, $stack];
  3.                     }
  4.                     $carry = method_exists($pipe, $this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable, $e);
  1.     {
  2.         $pipeline = array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.         $this->bootstrap();
  2.         return (new Pipeline($this->app))
  3.                     ->send($request)
  4.                     ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  5.                     ->then($this->dispatchToRouter());
  6.     }
  7.     /**
  8.      * Bootstrap the application for HTTP requests.
  9.      *
  1.         $this->requestStartedAt = Carbon::now();
  2.         try {
  3.             $request->enableHttpMethodParameterOverride();
  4.             $response = $this->sendRequestThroughRouter($request);
  5.         } catch (Throwable $e) {
  6.             $this->reportException($e);
  7.             $response = $this->renderException($request, $e);
  8.         }
Kernel->handle(object(Request)) in /var/www/html/index.php (line 97)
  1. |
  2. */
  3. $kernel = $app->make('Illuminate\Contracts\Http\Kernel');
  4. $response = $kernel->handle(
  5.     $request = Illuminate\Http\Request::capture()
  6. );
  7. $response->send();

Stack Traces 2

[2/2] QueryException
Illuminate\Database\QueryException:
SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'mw_user'@'172.29.0.2' for table `mw_tenant_12`.`sucess_co__media_thumbnails` (Connection: tenant, SQL: select * from `sucess_co__media_thumbnails` where `uuid` = a14b9805-8fef-45ce-9384-6d468e90967d limit 1)

  at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:801
  at Illuminate\Database\Connection->runQueryCallback('select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1', array('a14b9805-8fef-45ce-9384-6d468e90967d'), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:755)
  at Illuminate\Database\Connection->run('select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1', array('a14b9805-8fef-45ce-9384-6d468e90967d'), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:407)
  at Illuminate\Database\Connection->select('select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1', array('a14b9805-8fef-45ce-9384-6d468e90967d'), true)
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2751)
  at Illuminate\Database\Query\Builder->runSelect()
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2740)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3294)
  at Illuminate\Database\Query\Builder->onceWithColumns(array('*'), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2739)
  at Illuminate\Database\Query\Builder->get(array('*'))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:737)
  at Illuminate\Database\Eloquent\Builder->getModels(array('*'))
     (/var/www/html/src/MicroweberPackages/Database/Eloquent/Builder/CachedBuilder.php:87)
  at MicroweberPackages\Database\Eloquent\Builder\CachedBuilder->get(array('*'))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php:296)
  at Illuminate\Database\Eloquent\Builder->first()
     (/var/www/html/src/MicroweberPackages/Media/routes/api.php:9)
  at Illuminate\Support\ServiceProvider->{closure}('a14b9805-8fef-45ce-9384-6d468e90967d')
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/CallableDispatcher.php:40)
  at Illuminate\Routing\CallableDispatcher->dispatch(object(Route), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php:237)
  at Illuminate\Routing\Route->runCallable()
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php:208)
  at Illuminate\Routing\Route->run()
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:799)
  at Illuminate\Routing\Router->Illuminate\Routing\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:141)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:116)
  at Illuminate\Pipeline\Pipeline->then(object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:798)
  at Illuminate\Routing\Router->runRouteWithinStack(object(Route), object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:777)
  at Illuminate\Routing\Router->runRoute(object(Request), object(Route))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:741)
  at Illuminate\Routing\Router->dispatchToRoute(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:730)
  at Illuminate\Routing\Router->dispatch(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:200)
  at Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:141)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/userfiles/modules/onebuild_saas/src/Http/Middleware/TenantIdentify.php:116)
  at OneBuild\SaaS\Http\Middleware\TenantIdentify->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:59)
  at Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/livewire/livewire/src/DisableBrowserCache.php:19)
  at Livewire\DisableBrowserCache->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php:39)
  at Illuminate\Http\Middleware\TrustProxies->handle(object(Request), object(Closure))
     (/var/www/html/src/MicroweberPackages/App/Http/Middleware/TrustProxies.php:42)
  at MicroweberPackages\App\Http\Middleware\TrustProxies->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/microweber-deps/laravel-cors/src/HandleCors.php:38)
  at Fruitcake\Cors\HandleCors->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:89)
  at Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27)
  at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
  at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:40)
  at Illuminate\Foundation\Http\Middleware\TrimStrings->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121)
  at Illuminate\Session\Middleware\StartSession->handleStatefulRequest(object(Request), object(Store), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64)
  at Illuminate\Session\Middleware\StartSession->handle(object(Request), object(Closure))
     (/var/www/html/src/MicroweberPackages/App/Http/Middleware/StartSessionExtended.php:22)
  at MicroweberPackages\App\Http\Middleware\StartSessionExtended->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
  at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31)
  at Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37)
  at Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:116)
  at Illuminate\Pipeline\Pipeline->then(object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:175)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144)
  at Illuminate\Foundation\Http\Kernel->handle(object(Request))
     (/var/www/html/index.php:97)                
[1/2] PDOException
PDOException:
SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'mw_user'@'172.29.0.2' for table `mw_tenant_12`.`sucess_co__media_thumbnails`

  at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:416
  at PDO->prepare('select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1')
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:416)
  at Illuminate\Database\Connection->Illuminate\Database\{closure}('select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1', array('a14b9805-8fef-45ce-9384-6d468e90967d'))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:788)
  at Illuminate\Database\Connection->runQueryCallback('select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1', array('a14b9805-8fef-45ce-9384-6d468e90967d'), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:755)
  at Illuminate\Database\Connection->run('select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1', array('a14b9805-8fef-45ce-9384-6d468e90967d'), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:407)
  at Illuminate\Database\Connection->select('select * from `sucess_co__media_thumbnails` where `uuid` = ? limit 1', array('a14b9805-8fef-45ce-9384-6d468e90967d'), true)
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2751)
  at Illuminate\Database\Query\Builder->runSelect()
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2740)
  at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3294)
  at Illuminate\Database\Query\Builder->onceWithColumns(array('*'), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2739)
  at Illuminate\Database\Query\Builder->get(array('*'))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:737)
  at Illuminate\Database\Eloquent\Builder->getModels(array('*'))
     (/var/www/html/src/MicroweberPackages/Database/Eloquent/Builder/CachedBuilder.php:87)
  at MicroweberPackages\Database\Eloquent\Builder\CachedBuilder->get(array('*'))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php:296)
  at Illuminate\Database\Eloquent\Builder->first()
     (/var/www/html/src/MicroweberPackages/Media/routes/api.php:9)
  at Illuminate\Support\ServiceProvider->{closure}('a14b9805-8fef-45ce-9384-6d468e90967d')
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/CallableDispatcher.php:40)
  at Illuminate\Routing\CallableDispatcher->dispatch(object(Route), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php:237)
  at Illuminate\Routing\Route->runCallable()
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php:208)
  at Illuminate\Routing\Route->run()
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:799)
  at Illuminate\Routing\Router->Illuminate\Routing\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:141)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:116)
  at Illuminate\Pipeline\Pipeline->then(object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:798)
  at Illuminate\Routing\Router->runRouteWithinStack(object(Route), object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:777)
  at Illuminate\Routing\Router->runRoute(object(Request), object(Route))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:741)
  at Illuminate\Routing\Router->dispatchToRoute(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php:730)
  at Illuminate\Routing\Router->dispatch(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:200)
  at Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:141)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/userfiles/modules/onebuild_saas/src/Http/Middleware/TenantIdentify.php:116)
  at OneBuild\SaaS\Http\Middleware\TenantIdentify->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:59)
  at Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/livewire/livewire/src/DisableBrowserCache.php:19)
  at Livewire\DisableBrowserCache->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php:39)
  at Illuminate\Http\Middleware\TrustProxies->handle(object(Request), object(Closure))
     (/var/www/html/src/MicroweberPackages/App/Http/Middleware/TrustProxies.php:42)
  at MicroweberPackages\App\Http\Middleware\TrustProxies->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/microweber-deps/laravel-cors/src/HandleCors.php:38)
  at Fruitcake\Cors\HandleCors->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:89)
  at Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27)
  at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
  at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:40)
  at Illuminate\Foundation\Http\Middleware\TrimStrings->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121)
  at Illuminate\Session\Middleware\StartSession->handleStatefulRequest(object(Request), object(Store), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64)
  at Illuminate\Session\Middleware\StartSession->handle(object(Request), object(Closure))
     (/var/www/html/src/MicroweberPackages/App/Http/Middleware/StartSessionExtended.php:22)
  at MicroweberPackages\App\Http\Middleware\StartSessionExtended->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
  at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31)
  at Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37)
  at Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:180)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:116)
  at Illuminate\Pipeline\Pipeline->then(object(Closure))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:175)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(object(Request))
     (/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144)
  at Illuminate\Foundation\Http\Kernel->handle(object(Request))
     (/var/www/html/index.php:97)