I am using Laravel 10.10 on Debian 10.2 with Postgres 13.11. php artisan tinker works and I can retrieve data this way, I can even migrate to the database. But I cannot get data through the Controllers.
return view('sales', [
'sales' => Sales::findOrFail(2)
]);
results in could not find driver (Connection: pgsql...
I don't think this is a routes issue. When I go to Network and look at the database table connect it say 500 error
. I also have sorted my database configuration, since I can migrate. I have also tried numerous remedies that I could find but I've had no success.
This is unique because I can connect to the database through tinker and by running migrations. So I am making a silly mistake somewhere else.
laravel.log output...
[2023-06-14 06:42:42] local.ERROR: could not find driver (Connection: pgsql, SQL: select * from "migrations") {"exception":"[object] (Illuminate\\Database\\QueryException(code: 0): could not find driver (Connection: pgsql, SQL: select * from \"migrations\") at /var/www/html/driptech/vendor/laravel/framework/src/Illuminate/Database/Connection.php:795)
[stacktrace]
Any assistance would be appreciated.