Simple MVC sceleton
Clone repository
git clone https://github.com/dnmisha/mvc-skeleton.git
routes:
'/':
controller: main:index
'/demo':
controller: main:demo
'/login':
controller: user:login
'/path1/path2/:int:':
controller: name_controller:name_action
params:
id: 3 #index of your dynamic param
component MvcKernel::$app->request
MvcKernel::$app->request->isPost()
MvcKernel::$app->request->redirect('/path');
if args sre empty return all post data
MvcKernel::$app->request->post()
if method receive variableName or/and defaultValue will return some variable with/or default value if it does't exist
The same solution for GET
MvcKernel::$app->request->get()