Laravel: using count in the where clause throwing error

Solution:

try to do this :- In config\database.php in mysql array

Set ‘strict’ => false // to disable all.