2023-05-10 15:15:50 +00:00
|
|
|
<?php
|
|
|
|
|
2023-05-11 01:29:47 +00:00
|
|
|
use Modules\CetakLabel\Http\Controllers\Api\DirectoratController;
|
2023-05-10 15:15:50 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| API Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
|
|
| is assigned the "api" middleware group. Enjoy building your API!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2023-05-15 03:13:09 +00:00
|
|
|
$module = file_get_contents(dirname(__FILE__,2).'/module.json');
|
|
|
|
$module = json_decode($module);
|
2023-05-10 15:15:50 +00:00
|
|
|
|
2023-05-15 03:13:09 +00:00
|
|
|
Route::domain($module->domain)->group(function (){
|
|
|
|
Route::middleware('auth:sanctum')->group(function (){
|
2023-05-10 15:15:50 +00:00
|
|
|
Route::resource('directorats', DirectoratController::class);
|
2023-05-15 03:13:09 +00:00
|
|
|
|
|
|
|
Route::get('test-sama', function(){
|
|
|
|
return 'cetaklabel-api';
|
|
|
|
});
|
2023-05-10 15:15:50 +00:00
|
|
|
});
|
|
|
|
});
|