Laravel Group by not working – LIMIT or GROUP BY with prepared statement not working

Laravel Group by not working – LIMIT or GROUP BY with prepared statement not working

In this Post We Will Explain About is Laravel Group by not working – LIMIT or GROUP BY with prepared statement not working With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Laravel’s groupBy function not workingExample

In this post we will show you Best way to implement PHP How to fix Group By not working in Laravel 5.3, hear for Laravel groupBy() On the collection not workingwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Read Also:  php read csv file into array Examples

Generally we are working with PHP frameworks laravel application as well as in my simple one of the system laravel function groupBy not working as well as it show following simple error. we are simple search lots data of in google as well as full solution finaly we are find best way solution how to simple way to fix it very easy way step by step.

Error message!!

Error message!!
#1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'opaper.notifications.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

This most of case problem always arise so when we are simple way to formate our system as well as and not fully system install some problems dependacy regarding like as a mysql. so, how to simple way fix it simple source code follow this step and simple fix it.

Read Also:  Laravel whereRaw havingRaw and orderByRaw Example

Step – 1 : Open Your /etc/mysql/my.cnf file

here source code available First open your /etc/mysql/my.cnf open this file using following some command and make some change this following changes.

sudo nano /etc/mysql/my.cnf

and then open the this file in nano as well as editor then after simple go to the last as well as add following source code in this file simplese and save it.

Read Also:  Angular 9/8 Material Radio Button Examples

[mysqld]
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Step – 2 : Open Your config/database.php file

and Then after simple open your laravel web-application’s config/database.php file and make some simple following changes here source code.

'mysql' => [
    'strict' => false,
    //'strict' => true,
],

Step – 3 : Restart Your MySql

After that after restart your system your MySql simple server by following simple command. and last way to your problem is gone.

sudo service mysql restart

Example

I hope you have Got What is Laravel route group with prefix not working anymore after upgrade from 5.3 to 5.4 And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Laravel Handling findOrFail exceptions
  2. Read Also:  PHP Laravel 5.8 Image Uploading Tutorial
  3. Read Also:  PHP cURL Requests with Parameters Example
  4. Read Also:  Check if row exists using Laravel
  5. Read Also:  Simple Vue js CRUD Example Tutorial From Scratch
  6. Read Also:  Angular 6 Components Tutorial with Examples
  7. Read Also:  how to open php file in chrome using xampp?
  8. Read Also:  Laravel Eloquent Update increment decrement Database column value
  9. Read Also:  how to check if a file exists in php?
  10. Read Also:  How to get last record from table using PHP Laravel
CLOSEX