2022-01-03 01:17:24 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Initialize;
|
|
|
|
|
2022-02-19 18:06:07 +01:00
|
|
|
use App\Setting\NamiSettings;
|
2022-01-03 01:17:24 +01:00
|
|
|
use Zoomyboy\LaravelNami\Api;
|
|
|
|
|
|
|
|
class Initializer {
|
|
|
|
|
2022-02-19 18:06:07 +01:00
|
|
|
public NamiSettings $settings;
|
|
|
|
public array $initializers = [
|
2022-01-03 01:17:24 +01:00
|
|
|
InitializeNationalities::class,
|
|
|
|
InitializeFees::class,
|
|
|
|
InitializeConfessions::class,
|
|
|
|
InitializeCountries::class,
|
|
|
|
InitializeGenders::class,
|
|
|
|
InitializeRegions::class,
|
|
|
|
InitializeActivities::class,
|
|
|
|
InitializeCourses::class,
|
|
|
|
InitializeMembers::class,
|
|
|
|
];
|
|
|
|
|
2022-02-19 18:06:07 +01:00
|
|
|
public function __construct(NamiSettings $settings)
|
|
|
|
{
|
|
|
|
$this->settings = $settings;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function run(): void {
|
|
|
|
foreach ($this->initializers as $initializer) {
|
|
|
|
app($initializer)->handle($this->settings->login());
|
2022-01-03 01:17:24 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|