M3: Filament 后台资源(文章/分类/评论/媒体/用户/友链)+ 博客设置页 + 仪表盘统计

This commit is contained in:
ak
2026-08-11 18:08:47 +08:00
parent 6214976a88
commit dee0208f1d
46 changed files with 1572 additions and 6 deletions
@@ -0,0 +1,39 @@
<?php
namespace App\Filament\Resources\Comments\Schemas;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Schemas\Schema;
class CommentForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('author_name')
->label('作者')
->required(),
TextInput::make('author_email')
->label('邮箱'),
TextInput::make('author_url')
->label('网站')
->url(),
Textarea::make('content')
->label('内容')
->required()
->rows(5),
Select::make('status')
->label('状态')
->options([
'published' => '已发布',
'pending' => '待审核',
'spam' => '垃圾',
'rejected' => '已拒绝',
])
->required(),
]);
}
}