完善功能
This commit is contained in:
@@ -11,6 +11,7 @@ use Filament\Forms\Components\Toggle;
|
||||
use Filament\Forms\Concerns\InteractsWithForms;
|
||||
use Filament\Forms\Contracts\HasForms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Page;
|
||||
|
||||
class SiteSettings extends Page implements HasForms
|
||||
@@ -51,7 +52,7 @@ class SiteSettings extends Page implements HasForms
|
||||
Section::make('首页配置')
|
||||
->schema([
|
||||
TextInput::make('home_featured_limit')->label('热门推荐数量')->numeric()->required(),
|
||||
TextInput::make('home_new_limit')->label('新加产品数量')->numeric()->required(),
|
||||
TextInput::make('home_new_limit')->label('新增产品数量')->numeric()->required(),
|
||||
TextInput::make('home_category_limit')->label('分类展示数量')->numeric()->required(),
|
||||
])->columns(3),
|
||||
Section::make('列表配置')
|
||||
@@ -96,7 +97,10 @@ class SiteSettings extends Page implements HasForms
|
||||
SiteSetting::updateOrCreate(['key' => $key], ['value' => $value]);
|
||||
}
|
||||
|
||||
$this->notify('success', '保存成功');
|
||||
Notification::make()
|
||||
->title('保存成功')
|
||||
->success()
|
||||
->send();
|
||||
}
|
||||
|
||||
private function getSettings(): array
|
||||
|
||||
Reference in New Issue
Block a user