. */ declare(strict_types=1); use FireflyIII\Models\TransactionType; use Illuminate\Database\Seeder; /** * Class TransactionTypeSeeder */ class TransactionTypeSeeder extends Seeder { public function run() { $types = [ TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::TRANSFER, TransactionType::OPENING_BALANCE, TransactionType::RECONCILIATION, ]; foreach ($types as $type) { try { TransactionType::create(['type' => $type]); } catch (PDOException $e) { Log::warning(sprintf('Could not create transaction type "%s". It might exist already.', $type)); } } } }