Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Laravel version 8 #224

Open
ishan-biztech opened this issue Sep 10, 2020 · 2 comments
Open

Support for Laravel version 8 #224

ishan-biztech opened this issue Sep 10, 2020 · 2 comments

Comments

@ishan-biztech
Copy link

No description provided.

@komen205
Copy link

It's working for me in laravel 8.
I just had to :
In config/database.php, set mysql's 'strict' to false.

'mysql' => [
    ...
    'strict' => false,
   ...
],

Originally posted by @kevintresuelo in #206 (comment)

@zaros-systems
Copy link

zaros-systems commented Feb 27, 2021

An alternative is to update the config modes on the fly, this way you only disable the modes needed to run your query

config()->set('database.connections.mysql.modes', [
    // 'ONLY_FULL_GROUP_BY',
    'STRICT_TRANS_TABLES',
    'NO_ZERO_IN_DATE',
    'NO_ZERO_DATE',
    'ERROR_FOR_DIVISION_BY_ZERO',
    'NO_AUTO_CREATE_USER',
    'NO_ENGINE_SUBSTITUTION'
]);

And then enable all modes again afterwards:

config()->set('database.connections.mysql.modes', null);

However this feels like a temporary fix that should not be needed.

From #206 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants