server('HTTP_HOST') !== parse_url(config('v2board.app_url'))['host']) { abort(403); } } $renderParams = [ 'title' => config('v2board.app_name', 'V2Board'), 'theme' => config('v2board.frontend_theme', 'v2board'), 'theme_path' => '/theme/' . config('v2board.frontend_theme', 'v2board') . '/assets/', 'version' => config('app.version'), 'description' => config('v2board.app_description', 'V2Board is best'), 'logo' => config('v2board.logo') ]; if (!config("theme.{$renderParams['theme']}")) { $themeService = new ThemeService($renderParams['theme']); $themeService->init(); } $renderParams['theme_config'] = config('theme.' . config('v2board.frontend_theme', 'v2board')); return view('theme::' . config('v2board.frontend_theme', 'v2board') . '.dashboard', $renderParams); }); //TODO:: 兼容 Route::get('/' . config('v2board.secure_path', config('v2board.frontend_admin_path', hash('crc32b', config('app.key')))), function () { return view('admin', [ 'title' => config('v2board.app_name', 'V2Board'), 'theme_sidebar' => config('v2board.frontend_theme_sidebar', 'light'), 'theme_header' => config('v2board.frontend_theme_header', 'dark'), 'theme_color' => config('v2board.frontend_theme_color', 'default'), 'background_url' => config('v2board.frontend_background_url'), 'version' => config('app.version'), 'logo' => config('v2board.logo'), 'secure_path' => config('v2board.secure_path', config('v2board.frontend_admin_path', crc32(config('app.key')))) ]); });