M3: Filament 后台资源(文章/分类/评论/媒体/用户/友链)+ 博客设置页 + 仪表盘统计
This commit is contained in:
@@ -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(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user