2024-12-02 01:18:34 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
2025-01-15 14:50:53 +07:00
|
|
|
use App\Http\Controllers\Master\CabangController;
|
2025-01-17 16:17:53 +07:00
|
|
|
use App\Http\Controllers\Backend\DashboardController;
|
2024-12-02 01:18:34 +07: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!
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Route::middleware('auth:api')->get('/user', function (Request $request) {
|
|
|
|
|
// return $request->user();
|
|
|
|
|
// });
|
2025-01-15 14:50:53 +07:00
|
|
|
|
2025-01-17 16:17:53 +07:00
|
|
|
Route::middleware(['auth:admin', 'menu'])->group(function () {
|
|
|
|
|
Route::get('/api/notifications', [DashboardController::class, 'notifications']);
|
2025-03-04 13:07:25 +07:00
|
|
|
Route::get('/api/mark_read/{id}', [DashboardController::class, 'mark_read']);
|
2025-01-23 17:46:38 +07:00
|
|
|
|
|
|
|
|
Route::get('/api/cabang-by-region/{regionCode}', [CabangController::class, 'getCabangByRegion']);
|
|
|
|
|
Route::get('/api/rayon-by-cabang/{cabangCode}', [CabangController::class, 'getRayonByCabang']);
|
|
|
|
|
|
|
|
|
|
Route::get('/api/cabang-by-regionId/{regionId}', [CabangController::class, 'getCabangByRegionId']);
|
|
|
|
|
Route::get('/api/rayon-by-cabangId/{cabangId}', [CabangController::class, 'getRayonByCabangId']);
|
2025-01-17 16:17:53 +07:00
|
|
|
});
|