-
Notifications
You must be signed in to change notification settings - Fork 0
/
routing.php
27 lines (21 loc) · 1.02 KB
/
routing.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
//error_reporting(E_ALL ^ E_NOTICE);
use core\App;
use core\Utils;
App::getRouter()->setDefaultRoute('login'); #default action
App::getRouter()->setLoginRoute('login'); #action to forward if no permissions
Utils::addRoute('login', 'LoginControl');
Utils::addRoute('logout', 'LoginControl');
Utils::addRoute('getLoginParams', 'LoginControl' );
Utils::addRoute('panel', 'PanelControl', ['Admin', 'User'] );
Utils::addRoute('supplyList', 'SupplyEditControl', ['Admin'] );
Utils::addRoute('supplyNew', 'SupplyEditControl', ['Admin', 'User'] );
Utils::addRoute('supplyEdit', 'SupplyEditControl', ['Admin', 'User'] );
Utils::addRoute('supplySave', 'SupplyEditControl', ['Admin'] );
Utils::addRoute('supplyDelete', 'SupplyEditControl', ['Admin'] );
Utils::addRoute('cartGet', 'CartAPI');
Utils::addRoute('cartPost', 'CartAPI');
Utils::addRoute('getOrder', 'OrderControl');
Utils::addRoute('showOrder', 'OrderControl');
Utils::addRoute('supplySearch', 'SupplyEditControl');
//Utils::addRoute('action_name', 'controller_class_name');