jarektkaczyk / eloquence-base

base for the Eloquence extensions + Searchable
https://softonsofa.com
MIT License
77 stars 69 forks source link

Searchable requires disabling the 'strict' mode (or disabling just 'ONLY_FULL_GROUP_BY') #8

Closed PeraMika closed 5 years ago

PeraMika commented 5 years ago

Searchable doesn't work in 'strict' mode (which is enabled by default in the newer versions of Laravel). In config/database.php this is required:

strict' => false,

or this:

            'strict' => true,
            // Explicitly enable specific modes, overriding strict setting
            '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'
            ],

to make Searchable working... It would be nice to mention this in the documentation ;)

jarektkaczyk commented 5 years ago

added to the documentation, thanks