. */ declare(strict_types=1); use FireflyIII\Models\AccountType; use Illuminate\Database\Seeder; /** * Class AccountTypeSeeder */ class AccountTypeSeeder extends Seeder { public function run(): void { $types = [ AccountType::DEFAULT, AccountType::CASH, AccountType::ASSET, AccountType::EXPENSE, AccountType::REVENUE, AccountType::INITIAL_BALANCE, AccountType::BENEFICIARY, AccountType::IMPORT, AccountType::LOAN, AccountType::RECONCILIATION, AccountType::DEBT, AccountType::MORTGAGE ]; foreach ($types as $type) { try { AccountType::create(['type' => $type]); } catch (PDOException $e) { Log::info(sprintf('Could not create account type "%s". It might exist already.', $type)); } } } }