AMS_Backend/app/Config/Routes.php
2025-11-06 13:41:06 +08:00

47 lines
2.5 KiB
PHP

<?php
use CodeIgniter\Router\RouteCollection;
/**
* @var RouteCollection $routes
*/
$routes->get('/', 'Home::index');
/*============================ User Login ========================================*/
$routes->group('admin', [], function ($routes) {
$routes->post('login', 'Backend\LoginController::index');
$routes->post('requestToken', 'Backend\LoginController::requestToken');
});
$routes->group('api', [], function ($routes) {
$routes->post('send-otp', 'Frontend\AuthController::sendOtp');
$routes->post('verify-api', 'Frontend\AuthController::verifyOtp');
$routes->post('payment/fiuu/notification', 'Frontend\PaymentController::fiuuPaymentNotification');
$routes->post('payment/fiuu/return', 'Frontend\PaymentController::fiuuPaymentReturn');
$routes->post('lalamove/webhook', 'Frontend\LalamoveController::webhook');
$routes->post('grab/webhook', 'Frontend\GrabController::webhook');
$routes->post('topup/fiuu/notification', 'Frontend\TopupController::fiuuTopupNotification');
});
$routes->group('api', ['namespace' => 'App\Controllers'], function($routes) {
$routes->resource('productbrand', ['controller' => 'ProductBrandController']);
$routes->resource('productcategory', ['controller' => 'ProductCategoryController']);
$routes->resource('productdescription', ['controller' => 'ProductDescriptionController']);
$routes->resource('supplierdetails', ['controller' => 'SupplierDetailsController']);
$routes->resource('productimei', ['controller' => 'ProductImeiController']);
$routes->resource('product', ['controller' => 'ProductController']);
$routes->resource('stock', ['controller' => 'StockController']);
$routes->resource('invoiceitem', ['controller' => 'InvoiceItemController']);
$routes->resource('platform', ['controller' => 'PlatformController']);
$routes->resource('customerdetails', ['controller' => 'CustomerDetailsController']);
$routes->resource('invoicetype', ['controller' => 'InvoiceTypeController']);
$routes->resource('paymentmethod', ['controller' => 'PaymentMethodController']);
$routes->resource('invoice', ['controller' => 'InvoiceController']);
$routes->resource('branchcategory', ['controller' => 'BranchCategoryController']);
$routes->resource('letterhead', ['controller' => 'LetterheadController']);
$routes->resource('branchdetails', ['controller' => 'BranchDetailsController']);
$routes->resource('position', ['controller' => 'PositionController']);
$routes->resource('staffdetails', ['controller' => 'StaffDetailsController']);
});