/** * loadRouting * * @return mixed */ public static function loadRouting() { $app = Ioc::getApplication(); if ($app->get('client') == 'admin' || $app->get('client') == 'site') { return parent::loadRouting(); } return []; }
/** * loadRouting * * @param MainRouter $router * @param string $group * * @return MainRouter */ public function loadRouting(MainRouter $router, $group = null) { $router = parent::loadRouting($router, $group); $router->group($group, function (MainRouter $router) { $router->addRouteFromFiles(Folder::files(__DIR__ . '/Resources/routing'), $this->getName()); // Merge other routes here... }); return $router; }
/** * loadRouting * * @return array|mixed */ public function loadRouting() { $routes = parent::loadRouting(); $routes = array_merge($routes, WarderHelper::getFrontendRouting()); return $routes; }
/** * loadRouting * * @return mixed */ public static function loadRouting() { $app = Ioc::getApplication(); return parent::loadRouting(); // return []; }
/** * loadRouting * * @return mixed */ public function loadRouting() { $routes = parent::loadRouting(); foreach (Folder::files(__DIR__ . '/Resources/routing') as $file) { if (File::getExtension($file) == 'yml') { $routes = array_merge($routes, (array) Yaml::parse(file_get_contents($file))); } } // Merge other routes here... $routes = array_merge($routes, WarderHelper::getAdminRouting()); $routes = array_merge($routes, LunaHelper::getAdminRouting()); return $routes; }