feature: add custom admin path

This commit is contained in:
Tokumeikoi 2020-07-17 20:01:28 +08:00
parent b974d1d227
commit 59761baa4d
4 changed files with 5 additions and 3 deletions

View File

@ -95,7 +95,8 @@ class ConfigController extends Controller
'frontend_theme_sidebar' => config('v2board.frontend_theme_sidebar', 'light'), 'frontend_theme_sidebar' => config('v2board.frontend_theme_sidebar', 'light'),
'frontend_theme_header' => config('v2board.frontend_theme_header', 'dark'), 'frontend_theme_header' => config('v2board.frontend_theme_header', 'dark'),
'frontend_theme_color' => config('v2board.frontend_theme_color', 'default'), 'frontend_theme_color' => config('v2board.frontend_theme_color', 'default'),
'frontend_background_url' => config('v2board.frontend_background_url') 'frontend_background_url' => config('v2board.frontend_background_url'),
'frontend_admin_path' => config('v2board.frontend_admin_path', 'admin')
], ],
'server' => [ 'server' => [
'server_token' => config('v2board.server_token'), 'server_token' => config('v2board.server_token'),

View File

@ -70,6 +70,7 @@ class ConfigSave extends FormRequest
'frontend_theme_header' => 'in:dark,light', 'frontend_theme_header' => 'in:dark,light',
'frontend_theme_color' => 'in:default,darkblue,black', 'frontend_theme_color' => 'in:default,darkblue,black',
'frontend_background_url' => 'nullable|url', 'frontend_background_url' => 'nullable|url',
'frontend_admin_path' => '',
// tutorial // tutorial
'apple_id' => 'email', 'apple_id' => 'email',
'apple_id_password' => '', 'apple_id_password' => '',

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ Route::get('/', function (Request $request) {
]); ]);
}); });
Route::get('/admin', function () { Route::get('/' . config('v2board.frontend_admin_path', 'admin'), function () {
return view('admin', [ return view('admin', [
'title' => config('v2board.app_name', 'V2Board'), 'title' => config('v2board.app_name', 'V2Board'),
'theme_sidebar' => config('v2board.frontend_theme_sidebar', 'light'), 'theme_sidebar' => config('v2board.frontend_theme_sidebar', 'light'),