I want to group all duplicate rows but I got error
Here is below error
Illuminate\Database\QueryException: SQLSTATE[42000]: Syntax error or access violation: 1055 'car_web.dependencies.id' isn't in GROUP BY (SQL: select * from
dependencieswheremake_dep= 3 group bymodel_dep) in file C:\xampp\htdocs\car-parts-web\vendor\laravel\framework\src\Illuminate\Database\Connection.php on line 671
I also change in database.php file
'strict' => true,
'modes' => [
//'ONLY_FULL_GROUP_BY', // Disable this to allow grouping by one column
'STRICT_TRANS_TABLES',
'NO_ZERO_IN_DATE',
'NO_ZERO_DATE',
'ERROR_FOR_DIVISION_BY_ZERO',
'NO_AUTO_CREATE_USER',
'NO_ENGINE_SUBSTITUTION'
],
but give same error
here is below my query
$data = DB::table('dependencies')
->where('make_dep', '=', $make)
->groupBy('model_dep')
->get();
php artisan config:cachedatabase.phpinside mysql array'strict' => false,make it false and try