mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-21 18:20:56 -04:00
32 lines
1011 B
PHP
32 lines
1011 B
PHP
<?php
|
|
|
|
use App\Models\GatewayType;
|
|
|
|
class GatewayTypesSeeder extends Seeder
|
|
{
|
|
public function run()
|
|
{
|
|
Eloquent::unguard();
|
|
|
|
$gateway_types = [
|
|
['alias' => 'credit_card', 'name' => 'Credit Card'],
|
|
['alias' => 'bank_transfer', 'name' => 'Bank Transfer'],
|
|
['alias' => 'paypal', 'name' => 'PayPal'],
|
|
['alias' => 'bitcoin', 'name' => 'Bitcoin'],
|
|
['alias' => 'dwolla', 'name' => 'Dwolla'],
|
|
['alias' => 'custom', 'name' => 'Custom'],
|
|
['alias' => 'alipay', 'name' => 'Alipay'],
|
|
['alias' => 'sofort', 'name' => 'Sofort'],
|
|
['alias' => 'sepa', 'name' => 'SEPA'],
|
|
['alias' => 'gocardless', 'name' => 'GoCardless'],
|
|
];
|
|
|
|
foreach ($gateway_types as $gateway_type) {
|
|
$record = GatewayType::where('name', '=', $gateway_type['name'])->first();
|
|
if (! $record) {
|
|
GatewayType::create($gateway_type);
|
|
}
|
|
}
|
|
}
|
|
}
|