// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (Exception $e) {
throw new QueryException(
$query, $this->prepareBindings($bindings), $e
);
}
return $result;
// Here we will run this query. If an exception occurs we'll determine if it was
// caused by a connection that has been lost. If that is the cause, we'll try
// to re-establish connection and re-run the query with a fresh connection.
try {
$result = $this->runQueryCallback($query, $bindings, $callback);
} catch (QueryException $e) {
$result = $this->handleQueryException(
$e, $query, $bindings, $callback
);
}
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
return $statement->fetchAll();
});
}
/**
* Run a select statement against the database and returns a generator.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
/**
* Paginate the given query into a simple paginator.
* @return \Illuminate\Support\Collection
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
if (is_null($original)) {
$this->columns = $columns;
}
$result = $callback();
$this->columns = $original;
return $result;
}
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
*
* @return \Illuminate\Database\Eloquent\Model[]|static[]
*/
public function getModels($columns = ['*'])
{
return $this->model->hydrate(
$this->query->get($columns)->all()
)->all();
}
/**
* Eager load the relationships for the models.
$builder = $this->applyScopes();
// If we actually found models we will also eager load any relationships that
// have been specified as needing to be eager loaded, which will solve the
// n+1 query issue for the developers to avoid running a lot of queries.
if (count($models = $builder->getModels($columns)) > 0) {
$models = $builder->eagerLoadRelations($models);
}
return $builder->getModel()->newCollection($models);
}
* @param array|string $columns
* @return \Illuminate\Database\Eloquent\Model|object|static|null
*/
public function first($columns = ['*'])
{
return $this->take(1)->get($columns)->first();
}
/**
* Execute the query and get the first result if it's the sole matching record.
*
* @throws \BadMethodCallException
*/
protected function forwardCallTo($object, $method, $parameters)
{
try {
return $object->{$method}(...$parameters);
} catch (Error | BadMethodCallException $e) {
$pattern = '~^Call to undefined method (?P<class>[^:]+)::(?P<method>[^\(]+)\(\)$~';
if (! preg_match($pattern, $e->getMessage(), $matches)) {
throw $e;
if ($resolver = (static::$relationResolvers[get_class($this)][$method] ?? null)) {
return $resolver($this);
}
return $this->forwardCallTo($this->newQuery(), $method, $parameters);
}
/**
* Handle dynamic static method calls into the model.
*
* @param array $parameters
* @return mixed
*/
public static function __callStatic($method, $parameters)
{
return (new static)->$method(...$parameters);
}
/**
* Convert the model to its string representation.
*
return file_exists($path) && is_file($path) ? @unlink($path) : false;
}
function activeTemplate($asset = false)
{
$gs = GeneralSetting::first(['active_template']);
$template = $gs->active_template;
$sess = session()->get('templates');
if (trim($sess) != null) {
public function boot()
{
Paginator::useBootstrap();
$activeTemplate = activeTemplate();
$activeTemplateTrue = activeTemplate(true);
$viewShare['general'] = GeneralSetting::first();
$viewShare['activeTemplate'] = $activeTemplate;
$viewShare['activeTemplateTrue'] = $activeTemplateTrue;
if (static::isCallableWithAtSign($callback) || $defaultMethod) {
return static::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
});
}
/**
* Call a string reference to a class using Class@method syntax.
* @param mixed $value
* @return mixed
*/
public static function unwrapIfClosure($value)
{
return $value instanceof Closure ? $value() : $value;
}
/**
* Get the class name of the given parameter's type, if possible.
*
if ($container->hasMethodBinding($method)) {
return $container->callMethodBinding($method, $callback[0]);
}
return Util::unwrapIfClosure($default);
}
/**
* Normalize the given callback into a Class@method string.
*
return static::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
});
}
/**
* Call a string reference to a class using Class@method syntax.
*
*
* @throws \InvalidArgumentException
*/
public function call($callback, array $parameters = [], $defaultMethod = null)
{
return BoundMethod::call($this, $callback, $parameters, $defaultMethod);
}
/**
* Get a closure to resolve the given type from the container.
*
protected function bootProvider(ServiceProvider $provider)
{
$provider->callBootingCallbacks();
if (method_exists($provider, 'boot')) {
$this->call([$provider, 'boot']);
}
$provider->callBootedCallbacks();
}
// for any listeners that need to do work after this initial booting gets
// finished. This is useful when ordering the boot-up processes we run.
$this->fireAppCallbacks($this->bootingCallbacks);
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
$this->fireAppCallbacks($this->bootedCallbacks);
// finished. This is useful when ordering the boot-up processes we run.
$this->fireAppCallbacks($this->bootingCallbacks);
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
$this->fireAppCallbacks($this->bootedCallbacks);
}
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
$app->boot();
}
}
$this->hasBeenBootstrapped = true;
foreach ($bootstrappers as $bootstrapper) {
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
$this->make($bootstrapper)->bootstrap($this);
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
}
}
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
* Get the route dispatcher callback.
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
public function handle($request)
{
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
$app = require_once __DIR__.'/core/bootstrap/app.php';
$kernel = $app->make(Kernel::class);
$response = tap($kernel->handle(
$request = Request::capture()
))->send();
$kernel->terminate($request, $response);
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
return new PDOConnection($dsn, $username, $password, $options);
}
return new PDO($dsn, $username, $password, $options);
}
/**
* Determine if the connection is persistent.
*
{
if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
return new PDOConnection($dsn, $username, $password, $options);
}
return new PDO($dsn, $username, $password, $options);
}
/**
* Determine if the connection is persistent.
*
$config['username'] ?? null, $config['password'] ?? null,
];
try {
return $this->createPdoConnection(
$dsn, $username, $password, $options
);
} catch (Exception $e) {
return $this->tryAgainIfCausedByLostConnection(
$e, $dsn, $username, $password, $options
);
$options = $this->getOptions($config);
// We need to grab the PDO options that should be used while making the brand
// new connection instance. The PDO options control various aspects of the
// connection's behavior, and some might be specified by the developers.
$connection = $this->createConnection($dsn, $config, $options);
if (! empty($config['database'])) {
$connection->exec("use `{$config['database']}`;");
}
return function () use ($config) {
foreach (Arr::shuffle($hosts = $this->parseHosts($config)) as $key => $host) {
$config['host'] = $host;
try {
return $this->createConnector($config)->connect($config);
} catch (PDOException $e) {
continue;
}
}
* @return \PDO
*/
public function getPdo()
{
if ($this->pdo instanceof Closure) {
return $this->pdo = call_user_func($this->pdo);
}
return $this->pdo;
}
if ($this->readPdo instanceof Closure) {
return $this->readPdo = call_user_func($this->readPdo);
}
return $this->readPdo ?: $this->getPdo();
}
/**
* Get the current read PDO connection parameter without executing any reconnect logic.
*
* @param bool $useReadPdo
* @return \PDO
*/
protected function getPdoForSelect($useReadPdo = true)
{
return $useReadPdo ? $this->getReadPdo() : $this->getPdo();
}
/**
* Run an insert statement against the database.
*
// For select statements, we'll simply execute the query and return an array
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
$statement = $this->prepared(
$this->getPdoForSelect($useReadPdo)->prepare($query)
);
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
// Here we will run this query. If an exception occurs we'll determine if it was
// caused by a connection that has been lost. If that is the cause, we'll try
// to re-establish connection and re-run the query with a fresh connection.
try {
$result = $this->runQueryCallback($query, $bindings, $callback);
} catch (QueryException $e) {
$result = $this->handleQueryException(
$e, $query, $bindings, $callback
);
}
$this->bindValues($statement, $this->prepareBindings($bindings));
$statement->execute();
return $statement->fetchAll();
});
}
/**
* Run a select statement against the database and returns a generator.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select(
$this->toSql(), $this->getBindings(), ! $this->useWritePdo
);
}
/**
* Paginate the given query into a simple paginator.
* @return \Illuminate\Support\Collection
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
if (is_null($original)) {
$this->columns = $columns;
}
$result = $callback();
$this->columns = $original;
return $result;
}
*/
public function get($columns = ['*'])
{
return collect($this->onceWithColumns(Arr::wrap($columns), function () {
return $this->processor->processSelect($this, $this->runSelect());
}));
}
/**
* Run the query as a "select" statement against the connection.
*
* @return \Illuminate\Database\Eloquent\Model[]|static[]
*/
public function getModels($columns = ['*'])
{
return $this->model->hydrate(
$this->query->get($columns)->all()
)->all();
}
/**
* Eager load the relationships for the models.
$builder = $this->applyScopes();
// If we actually found models we will also eager load any relationships that
// have been specified as needing to be eager loaded, which will solve the
// n+1 query issue for the developers to avoid running a lot of queries.
if (count($models = $builder->getModels($columns)) > 0) {
$models = $builder->eagerLoadRelations($models);
}
return $builder->getModel()->newCollection($models);
}
* @param array|string $columns
* @return \Illuminate\Database\Eloquent\Model|object|static|null
*/
public function first($columns = ['*'])
{
return $this->take(1)->get($columns)->first();
}
/**
* Execute the query and get the first result if it's the sole matching record.
*
* @throws \BadMethodCallException
*/
protected function forwardCallTo($object, $method, $parameters)
{
try {
return $object->{$method}(...$parameters);
} catch (Error | BadMethodCallException $e) {
$pattern = '~^Call to undefined method (?P<class>[^:]+)::(?P<method>[^\(]+)\(\)$~';
if (! preg_match($pattern, $e->getMessage(), $matches)) {
throw $e;
if ($resolver = (static::$relationResolvers[get_class($this)][$method] ?? null)) {
return $resolver($this);
}
return $this->forwardCallTo($this->newQuery(), $method, $parameters);
}
/**
* Handle dynamic static method calls into the model.
*
* @param array $parameters
* @return mixed
*/
public static function __callStatic($method, $parameters)
{
return (new static)->$method(...$parameters);
}
/**
* Convert the model to its string representation.
*
return file_exists($path) && is_file($path) ? @unlink($path) : false;
}
function activeTemplate($asset = false)
{
$gs = GeneralSetting::first(['active_template']);
$template = $gs->active_template;
$sess = session()->get('templates');
if (trim($sess) != null) {
public function boot()
{
Paginator::useBootstrap();
$activeTemplate = activeTemplate();
$activeTemplateTrue = activeTemplate(true);
$viewShare['general'] = GeneralSetting::first();
$viewShare['activeTemplate'] = $activeTemplate;
$viewShare['activeTemplateTrue'] = $activeTemplateTrue;
if (static::isCallableWithAtSign($callback) || $defaultMethod) {
return static::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
});
}
/**
* Call a string reference to a class using Class@method syntax.
* @param mixed $value
* @return mixed
*/
public static function unwrapIfClosure($value)
{
return $value instanceof Closure ? $value() : $value;
}
/**
* Get the class name of the given parameter's type, if possible.
*
if ($container->hasMethodBinding($method)) {
return $container->callMethodBinding($method, $callback[0]);
}
return Util::unwrapIfClosure($default);
}
/**
* Normalize the given callback into a Class@method string.
*
return static::callClass($container, $callback, $parameters, $defaultMethod);
}
return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getMethodDependencies($container, $callback, $parameters)));
});
}
/**
* Call a string reference to a class using Class@method syntax.
*
*
* @throws \InvalidArgumentException
*/
public function call($callback, array $parameters = [], $defaultMethod = null)
{
return BoundMethod::call($this, $callback, $parameters, $defaultMethod);
}
/**
* Get a closure to resolve the given type from the container.
*
protected function bootProvider(ServiceProvider $provider)
{
$provider->callBootingCallbacks();
if (method_exists($provider, 'boot')) {
$this->call([$provider, 'boot']);
}
$provider->callBootedCallbacks();
}
// for any listeners that need to do work after this initial booting gets
// finished. This is useful when ordering the boot-up processes we run.
$this->fireAppCallbacks($this->bootingCallbacks);
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
$this->fireAppCallbacks($this->bootedCallbacks);
// finished. This is useful when ordering the boot-up processes we run.
$this->fireAppCallbacks($this->bootingCallbacks);
array_walk($this->serviceProviders, function ($p) {
$this->bootProvider($p);
});
$this->booted = true;
$this->fireAppCallbacks($this->bootedCallbacks);
}
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
{
$app->boot();
}
}
$this->hasBeenBootstrapped = true;
foreach ($bootstrappers as $bootstrapper) {
$this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
$this->make($bootstrapper)->bootstrap($this);
$this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
}
}
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
}
}
/**
* Get the route dispatcher callback.
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
public function handle($request)
{
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
$app = require_once __DIR__.'/core/bootstrap/app.php';
$kernel = $app->make(Kernel::class);
$response = tap($kernel->handle(
$request = Request::capture()
))->send();
$kernel->terminate($request, $response);
[2/2]
QueryException
|
---|
Illuminate\Database\QueryException: SQLSTATE[HY000] [1040] Too many connections (SQL: select `active_template` from `general_settings` limit 1) at /home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:685 at Illuminate\Database\Connection->runQueryCallback() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:645) at Illuminate\Database\Connection->run() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:353) at Illuminate\Database\Connection->select() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2351) at Illuminate\Database\Query\Builder->runSelect() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2339) at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2905) at Illuminate\Database\Query\Builder->onceWithColumns() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2340) at Illuminate\Database\Query\Builder->get() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:604) at Illuminate\Database\Eloquent\Builder->getModels() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:588) at Illuminate\Database\Eloquent\Builder->get() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php:254) at Illuminate\Database\Eloquent\Builder->first() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:23) at Illuminate\Database\Eloquent\Model->forwardCallTo() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1970) at Illuminate\Database\Eloquent\Model->__call() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1982) at Illuminate\Database\Eloquent\Model::__callStatic() (/home/tradeopt/public_html/core/app/Http/Helpers/helpers.php:130) at activeTemplate() (/home/tradeopt/public_html/core/app/Providers/AppServiceProvider.php:35) at App\Providers\AppServiceProvider->boot() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36) at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/Util.php:40) at Illuminate\Container\Util::unwrapIfClosure() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93) at Illuminate\Container\BoundMethod::callBoundMethod() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37) at Illuminate\Container\BoundMethod::call() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/Container.php:614) at Illuminate\Container\Container->call() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:914) at Illuminate\Foundation\Application->bootProvider() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:895) at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}() at array_walk() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:896) at Illuminate\Foundation\Application->boot() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17) at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:237) at Illuminate\Foundation\Application->bootstrapWith() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:152) at Illuminate\Foundation\Http\Kernel->bootstrap() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:136) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:110) at Illuminate\Foundation\Http\Kernel->handle() (/home/tradeopt/public_html/index.php:52) |
[1/2]
PDOException
|
---|
PDOException: SQLSTATE[HY000] [1040] Too many connections at /home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70 at PDO->__construct() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70) at Illuminate\Database\Connectors\Connector->createPdoConnection() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:46) at Illuminate\Database\Connectors\Connector->createConnection() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:24) at Illuminate\Database\Connectors\MySqlConnector->connect() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:184) at Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}() at call_user_func() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:956) at Illuminate\Database\Connection->getPdo() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:991) at Illuminate\Database\Connection->getReadPdo() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:419) at Illuminate\Database\Connection->getPdoForSelect() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:345) at Illuminate\Database\Connection->Illuminate\Database\{closure}() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:678) at Illuminate\Database\Connection->runQueryCallback() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:645) at Illuminate\Database\Connection->run() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Connection.php:353) at Illuminate\Database\Connection->select() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2351) at Illuminate\Database\Query\Builder->runSelect() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2339) at Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2905) at Illuminate\Database\Query\Builder->onceWithColumns() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2340) at Illuminate\Database\Query\Builder->get() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:604) at Illuminate\Database\Eloquent\Builder->getModels() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:588) at Illuminate\Database\Eloquent\Builder->get() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php:254) at Illuminate\Database\Eloquent\Builder->first() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:23) at Illuminate\Database\Eloquent\Model->forwardCallTo() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1970) at Illuminate\Database\Eloquent\Model->__call() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:1982) at Illuminate\Database\Eloquent\Model::__callStatic() (/home/tradeopt/public_html/core/app/Http/Helpers/helpers.php:130) at activeTemplate() (/home/tradeopt/public_html/core/app/Providers/AppServiceProvider.php:35) at App\Providers\AppServiceProvider->boot() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36) at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/Util.php:40) at Illuminate\Container\Util::unwrapIfClosure() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93) at Illuminate\Container\BoundMethod::callBoundMethod() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37) at Illuminate\Container\BoundMethod::call() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Container/Container.php:614) at Illuminate\Container\Container->call() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:914) at Illuminate\Foundation\Application->bootProvider() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:895) at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}() at array_walk() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:896) at Illuminate\Foundation\Application->boot() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17) at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:237) at Illuminate\Foundation\Application->bootstrapWith() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:152) at Illuminate\Foundation\Http\Kernel->bootstrap() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:136) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/home/tradeopt/public_html/core/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:110) at Illuminate\Foundation\Http\Kernel->handle() (/home/tradeopt/public_html/index.php:52) |