. */ declare(strict_types=1); use FireflyIII\Models\LinkType; use Illuminate\Database\Seeder; /** * Class LinkTypeSeeder */ class LinkTypeSeeder extends Seeder { /** * */ public function run() { $types = [ [ 'name' => 'Related', 'inward' => 'relates to', 'outward' => 'relates to', 'editable' => false, ], [ 'name' => 'Refund', 'inward' => 'is (partially) refunded by', 'outward' => '(partially) refunds', 'editable' => false, ], ['name' => 'Paid', 'inward' => 'is (partially) paid for by', 'outward' => '(partially) pays for', 'editable' => false, ], [ 'name' => 'Reimbursement', 'inward' => 'is (partially) reimbursed by', 'outward' => '(partially) reimburses', 'editable' => false, ], ]; foreach ($types as $type) { try { LinkType::create($type); } catch (PDOException $e) { Log::info(sprintf('Could not create link type "%s". It might exist already.', $type['name'])); } } } }