invoiceninja/database/seeds/GatewayTypesSeeder.php
2016-09-26 12:33:30 +03:00

30 lines
788 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'],
];
foreach ($gateway_types as $gateway_type) {
$record = GatewayType::where('name', '=', $gateway_type['name'])->first();
if (!$record) {
GatewayType::create($gateway_type);
}
}
}
}