47 lines
1.7 KiB
PHP
47 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Admin\Controllers;
|
|
|
|
use Slowlyo\OwlAdmin\Controllers\IndexController as BaseController;
|
|
use Slowlyo\OwlAdmin\Admin;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Slowlyo\OwlAdmin\Models\Extension;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class IndexController extends BaseController
|
|
{
|
|
public function settings(): JsonResponse|JsonResource
|
|
{
|
|
return $this->response()->success([
|
|
'assets' => Admin::getAssets(),
|
|
'app_name' => config('admin.name'),
|
|
'locale' => config('app.locale'),
|
|
'layout' => config('admin.layout'),
|
|
'logo' => url(config('admin.logo')),
|
|
|
|
'login_captcha' => config('admin.auth.login_captcha'),
|
|
'show_development_tools' => config('admin.show_development_tools'),
|
|
'system_theme_setting' => Admin::setting()->get('system_theme_setting', [
|
|
"animateInDuration" => 550,
|
|
"animateInType" => "alpha",
|
|
"animateOutDuration" => 450,
|
|
"animateOutType" => "alpha",
|
|
"breadcrumb" => true,
|
|
"breadcrumbIcon" => false,
|
|
"enableTab" => false,
|
|
"footer" => false,
|
|
"keepAlive" => false,
|
|
"layoutMode" => "default",
|
|
"loginTemplate" => "default",
|
|
"menuWidth" => 220,
|
|
"siderTheme" => "light",
|
|
"tabIcon" => true,
|
|
"theme" => "light",
|
|
"themeColor" => "#4080FF",
|
|
"topTheme" => "light",
|
|
]),
|
|
'enabled_extensions' => Extension::query()->where('is_enabled', 1)->pluck('name')?->toArray(),
|
|
]);
|
|
}
|
|
}
|