2017-11-20 17:28:15 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Seeds;
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
use App\Abstracts\Model;
|
2017-11-20 17:28:15 +03:00
|
|
|
use Illuminate\Database\Seeder;
|
2021-09-06 14:46:42 +03:00
|
|
|
use Illuminate\Support\Facades\Artisan;
|
2017-11-20 17:28:15 +03:00
|
|
|
|
|
|
|
class Modules 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-11-20 17:28:15 +03:00
|
|
|
|
2020-02-03 18:57:31 +03:00
|
|
|
Artisan::call('module:install', [
|
|
|
|
'alias' => 'offline-payments',
|
|
|
|
'company' => $company_id,
|
2021-06-15 14:46:18 +03:00
|
|
|
'locale' => session('locale', company($company_id)->locale),
|
2020-02-03 18:57:31 +03:00
|
|
|
]);
|
|
|
|
|
|
|
|
Artisan::call('module:install', [
|
|
|
|
'alias' => 'paypal-standard',
|
|
|
|
'company' => $company_id,
|
2021-06-15 14:46:18 +03:00
|
|
|
'locale' => session('locale', company($company_id)->locale),
|
2020-02-03 18:57:31 +03:00
|
|
|
]);
|
2017-11-20 17:28:15 +03:00
|
|
|
}
|
|
|
|
}
|