init backend presensi
This commit is contained in:
38
app/Modules/Devices/Routes.php
Normal file
38
app/Modules/Devices/Routes.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Devices Module Routes
|
||||
*
|
||||
* This file is automatically loaded by ModuleLoader.
|
||||
* Define your device management routes here.
|
||||
*
|
||||
* @var RouteCollection $routes
|
||||
*/
|
||||
|
||||
// Device authentication routes
|
||||
$routes->group('api/device', ['namespace' => 'App\Modules\Devices\Controllers'], function ($routes) {
|
||||
$routes->post('login', 'DeviceAuthController::login');
|
||||
});
|
||||
|
||||
// Mobile support routes (no auth required)
|
||||
$routes->group('api/mobile', ['namespace' => 'App\Modules\Devices\Controllers'], function ($routes) {
|
||||
$routes->get('ping', 'MobileController::ping');
|
||||
$routes->get('bootstrap', 'MobileController::bootstrap');
|
||||
});
|
||||
|
||||
// Device management (admin only)
|
||||
$routes->group('api/devices', [
|
||||
'namespace' => 'App\Modules\Devices\Controllers',
|
||||
'filter' => 'admin_only',
|
||||
], function ($routes) {
|
||||
$routes->put('(:num)', 'DeviceController::update/$1');
|
||||
});
|
||||
|
||||
// Example route structure (uncomment and modify as needed):
|
||||
// $routes->group('api/devices', ['namespace' => 'App\Modules\Devices\Controllers'], function($routes) {
|
||||
// $routes->get('/', 'DeviceController::index');
|
||||
// $routes->get('(:num)', 'DeviceController::show/$1');
|
||||
// $routes->post('/', 'DeviceController::register');
|
||||
// $routes->put('(:num)', 'DeviceController::update/$1');
|
||||
// $routes->delete('(:num)', 'DeviceController::delete/$1');
|
||||
// });
|
||||
Reference in New Issue
Block a user