MUSTAFA-Hamzawy / Multi-vendor-eCommerce-laravel

This is a backend system for multi-vendor eCommerce
MIT License
37 stars 21 forks source link

could not find driver (SQL: select * from `users` where `role` = vendor) #20

Open skeeperloyaltie opened 7 months ago

skeeperloyaltie commented 7 months ago

composer install --ignore-platform-req=ext-dom --ignore-platform-req=ext-xml --ignore-platform-req=ext-xmlwriter

Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi

Illuminate\Database\QueryException

could not find driver (SQL: select * from users where role = vendor)

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 756▕ // If an exception occurs when attempting to run a query, we'll format the error 757▕ // message to include the bindings with SQL, which will make this exception a 758▕ // lot more helpful to the developer instead of just the database's errors. 759▕ catch (Exception $e) { ➜ 760▕ throw new QueryException( 761▕ $query, $this->prepareBindings($bindings), $e 762▕ ); 763▕ } 764▕ }

1 [internal]:0 Illuminate\Foundation\Application::Illuminate\Foundation{closure}()

  +19 vendor frames 

21 routes/admin.php:21 Illuminate\Database\Eloquent\Builder::get() Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

There seems to be an issue with selecting the users

AmirAghighi02 commented 1 day ago

there are some places that you should not run queries. I had this issue when i tried to execute a query in constructor of a command class.