Can you please post your composer.json file contents?
Nov 5, 2020
26
Level 1
Base Table not found during composer install
Hi all!
During 'composer install' I getting this issue. I researched a lot of topics, didn't find relation database in AppServiceProvider. Adjusted .env to correct database connection settings (but earlier this command processed without this).
But I cannot understand, why it is happening during composer install...
I am use Laravel 8.x.
Thanks for any help and advise.
Illuminate\Database\QueryException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'project.categories' doesn't exist (SQL: select `id`, `template` from `categories`)
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667▕ // If an exception occurs when attempting to run a query, we'll format the error
668▕ // message to include the bindings with SQL, which will make this exception a
669▕ // lot more helpful to the developer instead of just the database's errors.
670▕ catch (Exception $e) {
➜ 671▕ throw new QueryException(
672▕ $query, $this->prepareBindings($bindings), $e
673▕ );
674▕ }
675▕
• A table was not found: You might have forgotten to run your migrations. You can run your migrations using `php artisan migrate`.
https://laravel.com/docs/master/migrations#running-migrations
1 [internal]:0
App\Console\Commands\Parser::__construct(Object(App\Services\Image), Object(App\Services\Category), Object(App\Services\Brand))
+12 vendor frames
14 app/Services/Category.php:46
Illuminate\Database\Eloquent\Model::all()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Level 75
Use it like this
use Illuminate\Support\Facades\App;
if (! App::runningInConsole()) {
view()->share('currency', app('activeCurrency')->symbol);
}
5 likes
Please or to participate in this conversation.