28 lines
652 B
PHP
28 lines
652 B
PHP
<?php
|
|
|
|
namespace App\Containers\Education\UI\API\Controllers;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Jobs\CreateDirectionStudy;
|
|
use App\Jobs\CreateEducationalProgram;
|
|
|
|
class UpdateEduDataApiController extends Controller
|
|
{
|
|
|
|
public function index()
|
|
{
|
|
$this->updateOrCreateDirectionStudy();
|
|
$this->updateOrCreateEducationProgram();
|
|
return redirect()->route('index');
|
|
}
|
|
|
|
private function updateOrCreateDirectionStudy() : void
|
|
{
|
|
dispatch(new CreateDirectionStudy());
|
|
}
|
|
private function updateOrCreateEducationProgram() : void
|
|
{
|
|
dispatch(new CreateEducationalProgram());
|
|
}
|
|
}
|