akaunting/database/seeds/Settings.php

52 lines
1.2 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
namespace Database\Seeds;
2019-11-16 10:21:14 +03:00
use App\Abstracts\Model;
2017-09-14 22:21:00 +03:00
use Illuminate\Database\Seeder;
class Settings extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->create();
Model::reguard();
}
private function create()
{
2018-07-26 23:00:45 +03:00
$company_id = $this->command->argument('company');
2017-09-14 22:21:00 +03:00
2020-08-06 19:10:05 +03:00
$offline_payments = [
[
'code' => 'offline-payments.cash.1',
'name' => trans('demo.offline_payments.cash'),
'customer' => '0',
'order' => '1',
'description' => null,
],
[
'code' => 'offline-payments.bank_transfer.2',
'name' => trans('demo.offline_payments.bank'),
'customer' => '0',
'order' => '2',
'description' => null,
],
2020-01-08 17:07:18 +03:00
];
2019-02-22 16:14:13 +03:00
setting()->set([
2019-11-16 10:21:14 +03:00
'invoice.title' => trans_choice('general.invoices', 1),
'wizard.completed' => '0',
2020-01-08 17:07:18 +03:00
'offline-payments.methods' => json_encode($offline_payments),
2017-09-14 22:21:00 +03:00
]);
}
}