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 Artisan;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
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,
|
|
|
|
'locale' => session('locale', app()->getLocale()),
|
|
|
|
]);
|
|
|
|
|
|
|
|
Artisan::call('module:install', [
|
|
|
|
'alias' => 'paypal-standard',
|
|
|
|
'company' => $company_id,
|
|
|
|
'locale' => session('locale', app()->getLocale()),
|
|
|
|
]);
|
2017-11-20 17:28:15 +03:00
|
|
|
}
|
|
|
|
}
|