1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/database/seeds/PaymentTermsSeeder.php
2019-01-30 22:25:07 +11:00

22 lines
461 B
PHP

<?php
use App\Models\PaymentTerm;
class PaymentTermsSeeder extends Seeder
{
public function run()
{
Eloquent::unguard();
$paymentTerms = [
['num_days' => -1, 'name' => 'Net 0'],
];
foreach ($paymentTerms as $paymentTerm) {
if (! DB::table('payment_terms')->where('name', '=', $paymentTerm['name'])->first()) {
PaymentTerm::create($paymentTerm);
}
}
}
}