Slim Application Error

The application could not run because of the following error:

Details

Type: Illuminate\Database\QueryException
Code: 42000
Message: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #32 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hyundai.variants.price' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select `products`.*, `variants`.`price` as `price`, `variants`.`price_compare` as `price_compare` from `products` inner join `variants` on `products`.`id` = `variants`.`product_id` where `products`.`status` = active and `variants`.`status` = active group by `products`.`id`)
File: /var/www/html/hyundai/vendor/illuminate/database/Connection.php
Line: 664

Trace

#0 /var/www/html/hyundai/vendor/illuminate/database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('select `product...', Array, Object(Closure))
#1 /var/www/html/hyundai/vendor/illuminate/database/Connection.php(333): Illuminate\Database\Connection->run('select `product...', Array, Object(Closure))
#2 /var/www/html/hyundai/vendor/illuminate/database/Query/Builder.php(2130): Illuminate\Database\Connection->select('select `product...', Array, true)
#3 /var/www/html/hyundai/vendor/illuminate/database/Query/Builder.php(2324): Illuminate\Database\Query\Builder->runSelect()
#4 /var/www/html/hyundai/vendor/illuminate/database/Query/Builder.php(2604): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#5 /var/www/html/hyundai/vendor/illuminate/database/Query/Builder.php(2326): Illuminate\Database\Query\Builder->onceWithColumns(Array, Object(Closure))
#6 /var/www/html/hyundai/vendor/illuminate/database/Eloquent/Builder.php(717): Illuminate\Database\Query\Builder->pluck('products.id', NULL)
#7 /var/www/html/hyundai/src/Modules/Collection/Controller/CollectionController.php(44): Illuminate\Database\Eloquent\Builder->pluck('products.id')
#8 [internal function]: Modules\Collection\Controller\CollectionController->all(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#9 /var/www/html/hyundai/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#10 /var/www/html/hyundai/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#11 /var/www/html/hyundai/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#12 /var/www/html/hyundai/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#13 /var/www/html/hyundai/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 /var/www/html/hyundai/src/Library/JwtAndSessionAuth.php(52): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#15 [internal function]: App\Library\JwtAndSessionAuth->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#16 /var/www/html/hyundai/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(App\Library\JwtAndSessionAuth), Array)
#17 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#18 /var/www/html/hyundai/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#19 /var/www/html/hyundai/src/Library/JwtAndSessionAuth.php(52): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#20 [internal function]: App\Library\JwtAndSessionAuth->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#21 /var/www/html/hyundai/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(App\Library\JwtAndSessionAuth), Array)
#22 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#23 /var/www/html/hyundai/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#24 /var/www/html/hyundai/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#25 /var/www/html/hyundai/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#26 /var/www/html/hyundai/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#27 /var/www/html/hyundai/public/index.php(46): Slim\App->run()
#28 {main}

Previous exception

Type: PDOException
Code: 42000
Message: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #32 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'hyundai.variants.price' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /var/www/html/hyundai/vendor/illuminate/database/Connection.php
Line: 326

Trace

#0 /var/www/html/hyundai/vendor/illuminate/database/Connection.php(326): PDO->prepare('select `product...')
#1 /var/www/html/hyundai/vendor/illuminate/database/Connection.php(657): Illuminate\Database\Connection->Illuminate\Database\{closure}('select `product...', Array)
#2 /var/www/html/hyundai/vendor/illuminate/database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('select `product...', Array, Object(Closure))
#3 /var/www/html/hyundai/vendor/illuminate/database/Connection.php(333): Illuminate\Database\Connection->run('select `product...', Array, Object(Closure))
#4 /var/www/html/hyundai/vendor/illuminate/database/Query/Builder.php(2130): Illuminate\Database\Connection->select('select `product...', Array, true)
#5 /var/www/html/hyundai/vendor/illuminate/database/Query/Builder.php(2324): Illuminate\Database\Query\Builder->runSelect()
#6 /var/www/html/hyundai/vendor/illuminate/database/Query/Builder.php(2604): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#7 /var/www/html/hyundai/vendor/illuminate/database/Query/Builder.php(2326): Illuminate\Database\Query\Builder->onceWithColumns(Array, Object(Closure))
#8 /var/www/html/hyundai/vendor/illuminate/database/Eloquent/Builder.php(717): Illuminate\Database\Query\Builder->pluck('products.id', NULL)
#9 /var/www/html/hyundai/src/Modules/Collection/Controller/CollectionController.php(44): Illuminate\Database\Eloquent\Builder->pluck('products.id')
#10 [internal function]: Modules\Collection\Controller\CollectionController->all(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#11 /var/www/html/hyundai/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#12 /var/www/html/hyundai/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#13 /var/www/html/hyundai/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 /var/www/html/hyundai/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#15 /var/www/html/hyundai/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /var/www/html/hyundai/src/Library/JwtAndSessionAuth.php(52): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 [internal function]: App\Library\JwtAndSessionAuth->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#18 /var/www/html/hyundai/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(App\Library\JwtAndSessionAuth), Array)
#19 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#20 /var/www/html/hyundai/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#21 /var/www/html/hyundai/src/Library/JwtAndSessionAuth.php(52): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#22 [internal function]: App\Library\JwtAndSessionAuth->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#23 /var/www/html/hyundai/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(App\Library\JwtAndSessionAuth), Array)
#24 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#25 /var/www/html/hyundai/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#26 /var/www/html/hyundai/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#27 /var/www/html/hyundai/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#28 /var/www/html/hyundai/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#29 /var/www/html/hyundai/public/index.php(46): Slim\App->run()
#30 {main}