Fix for 'Table ninja.accounts doesn't exist'

This commit is contained in:
Hillel Coren 2024-07-11 10:15:24 +03:00
parent 6dae814a28
commit ec968c6357
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -18,6 +18,7 @@ npm-debug.log
yarn-error.log
local_version.txt
.env
.env.bak
.phpunit.result.cache
_ide_helper.php

View File

@ -35,6 +35,7 @@ use League\Fractal\Resource\Item;
use App\Models\BankTransactionRule;
use Illuminate\Support\Facades\Auth;
use App\Transformers\ArraySerializer;
use Illuminate\Support\Facades\Schema as DbSchema;
use App\Transformers\EntityTransformer;
use League\Fractal\Resource\Collection;
use Illuminate\Database\Eloquent\Builder;
@ -1106,7 +1107,7 @@ class BaseController extends Controller
public function flutterRoute()
{
if ((bool) $this->checkAppSetup() !== false && $account = Account::first()) {
if ((bool) $this->checkAppSetup() !== false && DbSchema::hasTable('accounts') && $account = Account::first()) {
/** @var \App\Models\Account $account */