public static function run($argv) { error_reporting(E_ALL ^ E_NOTICE); $console = $argv[1] ? $argv[1] : ''; unset($argv[0]); unset($argv[1]); $param = array_values($argv); config::set('console', $console); config::set('param', $param); $route = new System\Route(); return $route->make($console, $param); }
}); /** * Frontend Routes * Namespaces indicate folder structure */ $router->group(['namespace' => 'Frontend'], function () use($router) { require __DIR__ . '/Routes/Frontend/Frontend.php'; require __DIR__ . '/Routes/Frontend/Access.php'; }); /** * Backend Routes * Namespaces indicate folder structure */ $router->group(['namespace' => 'Backend'], function () use($router) { $router->group(['prefix' => 'admin', 'middleware' => 'auth'], function () use($router) { /** * These routes need view-backend permission (good if you want to allow more than one group in the backend, then limit the backend features by different roles or permissions) * * Note: Administrator has all permissions so you do not have to specify the administrator role everywhere. */ $router->group(['middleware' => 'access.routeNeedsPermission:view-backend'], function () use($router) { require __DIR__ . '/Routes/Backend/Dashboard.php'; require __DIR__ . '/Routes/Backend/Access.php'; require __DIR__ . '/Routes/Backend/LogViewer.php'; require __DIR__ . '/Routes/Backend/Organization.php'; }); }); }); $router->group(['middleware' => 'auth'], function () use($router) { System\Route::make()->define(); });