diff --git a/app/Http/Controllers/HumanResourceController.php b/app/Http/Controllers/HumanResourceController.php index 0defd38..8e23f87 100644 --- a/app/Http/Controllers/HumanResourceController.php +++ b/app/Http/Controllers/HumanResourceController.php @@ -6,6 +6,7 @@ use Illuminate\Http\Request; use App\Models\HumanResource; use App\Models\UserToActivity; use App\Models\UserToProyek; +use Illuminate\Support\Facades\Artisan; class HumanResourceController extends Controller { @@ -170,4 +171,8 @@ class HumanResourceController extends Controller return response()->json(['status'=>'failed','message'=>'old_password is required!','code'=>400], 400); } } + + public function sync(){ + Artisan::call('sync:integration-human-resources'); + } } diff --git a/routes/web.php b/routes/web.php index b403f54..c3f9058 100644 --- a/routes/web.php +++ b/routes/web.php @@ -108,6 +108,7 @@ $router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($rout $router->get('/human-resource/list', 'HumanResourceController@list'); $router->get('/human-resource/select', 'HumanResourceController@select'); $router->post('/human-resource/check-old-password/{id}', 'HumanResourceController@checkOldPassword'); + $router->get('/human-resource/sync', 'HumanResourceController@sync'); $router->post('/project-role/search', 'ProjectRoleController@search'); $router->post('/project-role/add', 'ProjectRoleController@add');