How are you running laravel? Docker by any chance?
Why can't Laravel do the migration of tables if in a controller it shows the records correctly?
I have a laravel 7 with postgres 9.5, when I try to show some records the answer is ok, works well. But when i try to do a migration with php artisan migrate, I have an driver error. Composer is updated. (In laravel 8 the same thing happens)
Test query controller, response ok with the records in the view:
object(Illuminate\Support\Collection)#284 (1) { ["items":protected]=> array(2) { [0]=> object(stdClass)#286 (3) { ["id"]=> int(1) ["title"]=> string(5) "aaaaaaa" ["title2"]=> string(4) "bbbbbbb" } } }
The error: php artisan migrate response:
Illuminate\Database\QueryException could not find driver (SQL: select * from information_schema.tables where table_schema = myschema and table_name = migrations and table_type = 'BASE TABLE')
I already tried these commands, without success.
php artisan cache:clear php artisan config:cache php artisan optimize:clear
I don't understand how laravel can access the records in a controller but not access to do the migration
I accept ideas of all colors. Thanks!
Please or to participate in this conversation.