plus
parent
b5444edf83
commit
fe7f1276d8
|
|
@ -13,12 +13,6 @@ use Dcat\Admin\Extend\ServiceProvider as BaseServiceProvider;
|
||||||
*/
|
*/
|
||||||
class ServiceProvider extends BaseServiceProvider
|
class ServiceProvider extends BaseServiceProvider
|
||||||
{
|
{
|
||||||
protected $js = [
|
|
||||||
'js/index.js',
|
|
||||||
];
|
|
||||||
protected $css = [
|
|
||||||
'css/index.css',
|
|
||||||
];
|
|
||||||
protected $middleware = [
|
protected $middleware = [
|
||||||
'before' => [
|
'before' => [
|
||||||
BeforeInjectDcatPlus::class,
|
BeforeInjectDcatPlus::class,
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@ class Support
|
||||||
config([
|
config([
|
||||||
'app.url' => $site_url,
|
'app.url' => $site_url,
|
||||||
'app.debug' => (bool)$site_debug,
|
'app.debug' => (bool)$site_debug,
|
||||||
'app.locale' => admin_setting('site_lang'),
|
'app.locale' => admin_setting('site_lang', config('app.locale')),
|
||||||
'app.fallback_locale' => admin_setting('site_lang'),
|
'app.fallback_locale' => admin_setting('site_lang', config('app.fallback_locale')),
|
||||||
|
|
||||||
'admin.title' => admin_setting('site_title'),
|
'admin.title' => admin_setting('site_title'),
|
||||||
'admin.logo' => $logo,
|
'admin.logo' => $logo,
|
||||||
|
|
|
||||||
|
|
@ -4,19 +4,7 @@ namespace Peidikeji\Keywords\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::group([
|
Route::get('api/keywords', [KeywordsController::class, 'list'])->name('api.keywords');
|
||||||
'prefix' => config('admin.route.prefix'),
|
|
||||||
'middleware' => config('admin.route.middleware'),
|
|
||||||
], function () {
|
|
||||||
Route::get('api/keywords', [KeywordsController::class, 'list'])->name('api.keywords');
|
|
||||||
|
|
||||||
Route::resource('keywords', KeywordsController::class)->names('keywords');
|
Route::resource('keywords', KeywordsController::class)->names('keywords');
|
||||||
});
|
|
||||||
|
|
||||||
Route::group([
|
|
||||||
'prefix' => 'api',
|
|
||||||
'middleware' => 'api'
|
|
||||||
], function () {
|
|
||||||
Route::get('keywords', [KeywordsController::class, 'json']);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -542,7 +542,7 @@ class Admin
|
||||||
|
|
||||||
$jsVariables['pjax_container_selector'] = $pjaxId ? ('#'.$pjaxId) : '';
|
$jsVariables['pjax_container_selector'] = $pjaxId ? ('#'.$pjaxId) : '';
|
||||||
$jsVariables['token'] = csrf_token();
|
$jsVariables['token'] = csrf_token();
|
||||||
$jsVariables['lang'] = ($lang = is_array(__('admin.client')) ? __('admin.client'): []) ? array_merge($lang, $jsVariables['lang'] ?? []) : [];
|
$jsVariables['lang'] = ($lang = __('admin.client')) ? array_merge($lang, $jsVariables['lang'] ?? []) : [];
|
||||||
$jsVariables['colors'] = static::color()->all();
|
$jsVariables['colors'] = static::color()->all();
|
||||||
$jsVariables['dark_mode'] = static::isDarkMode();
|
$jsVariables['dark_mode'] = static::isDarkMode();
|
||||||
$jsVariables['sidebar_dark'] = config('admin.layout.sidebar_dark') || ($sidebarStyle === 'dark');
|
$jsVariables['sidebar_dark'] = config('admin.layout.sidebar_dark') || ($sidebarStyle === 'dark');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue