admin/controllers/AdminRouter.php
protected function loadAppAdminControllers()
    {
        $appControllerPath = NAILS_APP_PATH . 'application/modules/admin/controllers/';

        if (is_dir($appControllerPath)) {

            //  Look for controllers
            $files = directory_map($appControllerPath, 1);

            foreach ($files as $file) {

                //  Valid Admin file?
                if (!$this->isValidAdminFile($file)) {
                    continue;
                }

                $fileName = substr($file, 0, strpos($file, '.php'));

                //  Valid file, load it up and define the full class path and name
                require_once $appControllerPath . $file;
                $classPath = $appControllerPath . $file;
                $className = 'App\Admin\\App\\' . ucfirst($fileName);

                //  Load and process the class
                $this->loadAdminClass($fileName, $className, $classPath, 'app');
            }
        }
    }
protected function loadAppAdminControllers()
    {
        $appControllerPath = NAILS_APP_PATH . 'application/modules/admin/controllers/';

        if (is_dir($appControllerPath)) {

            //  Look for controllers
            $files = directory_map($appControllerPath, 1);

            foreach ($files as $file) {

                //  Valid Admin file?
                if (!$this->isValidAdminFile($file)) {
                    continue;
                }

                $fileName = substr($file, 0, strpos($file, '.php'));

                //  Valid file, load it up and define the full class path and name
                require_once $appControllerPath . $file;
                $classPath = $appControllerPath . $file;
                $className = 'App\Admin\\App\\' . ucfirst($fileName);

                //  Load and process the class
                $this->loadAdminClass($fileName, $className, $classPath, 'app');
            }
        }
    }
--------------------------------------------------------------------------