Dr-Panel/database/seeders/PaymentTypeSeeder.php

30 lines
1.3 KiB
PHP

<?php
namespace Database\Seeders;
use App\Models\PaymentType;
use Illuminate\Database\Seeder;
class PaymentTypeSeeder extends Seeder
{
public function run(): void
{
$paymentTypes = [
['payment_type' => 'بانک ملت', 'account_no' => '222', 'pos_no' => null, 'description' => null],
['payment_type' => 'بانک سامان', 'account_no' => '111', 'pos_no' => null, 'description' => null],
['payment_type' => 'پرداخت نقدی', 'account_no' => null, 'pos_no' => null, 'description' => null],
['payment_type' => 'بانک صادرات', 'account_no' => null, 'pos_no' => null, 'description' => null],
['payment_type' => 'کارت به کارت بانکی', 'account_no' => '123', 'pos_no' => '456', 'description' => null],
['payment_type' => 'نقد و کارت', 'account_no' => null, 'pos_no' => null, 'description' => null],
['payment_type' => 'توسعه عصر', 'account_no' => null, 'pos_no' => null, 'description' => null],
];
foreach ($paymentTypes as $item) {
PaymentType::firstOrCreate(
['payment_type' => $item['payment_type']],
$item
);
}
}
}