Dashboard
+Welcome to the admin panel!
+diff --git a/engine/app/controller/AboutController.php b/engine/app/controller/AboutController.php index 5fea904..c6b24c9 100644 --- a/engine/app/controller/AboutController.php +++ b/engine/app/controller/AboutController.php @@ -6,13 +6,12 @@ class AboutController { public function actionIndex() { - $result = AboutModel::getData(); - var_dump($result); + $result = AboutModel::getData(); + // var_dump($result); echo (View::render([ 'box' => $result, 'body' => 'To home', 'auth' => false ], 'tpl_layout.php')); - print("AboutController, А кто то почувствовал перерыв?"); } } diff --git a/engine/app/controller/AdminController.php b/engine/app/controller/AdminController.php new file mode 100644 index 0000000..9821869 --- /dev/null +++ b/engine/app/controller/AdminController.php @@ -0,0 +1,8 @@ + + +
+ + +Welcome to the admin panel!
+Файл "" не найден.
+ - \ No newline at end of file diff --git a/engine/core/Router.php b/engine/core/Router.php index 021d7f2..696b5af 100644 --- a/engine/core/Router.php +++ b/engine/core/Router.php @@ -12,7 +12,7 @@ class Router public function __construct() { - $routesPath = __DIR__ . '/../routes.php'; + $routesPath = __DIR__ . '/../routes.php'; $this->routes = include($routesPath); } @@ -29,6 +29,7 @@ class Router $actionName = 'action' . ucfirst(array_shift($segments)); $controllerObject = new $controllerName(); $result = $controllerObject->$actionName(); + break; // var_dump($controllerFile); } @@ -36,19 +37,8 @@ class Router // Page not found $obj = new MainController(); $obj->actionNotFound(); - // var_dump($obj); - // $controllerName = "MainController"; - // $actionName = "actionIndex"; - // $controllerObject = new $controllerName; - // $result = $controllerObject::$actionName(); - break; + // break; } - $controllerObject = new $controllerName; - $result = $controllerObject::$actionName(); - - // выводим название экшена - echo '