Initial baseline: LaraBlog core with plugin commerce surface.
Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Comments\Schemas;
|
||||
|
||||
use App\Models\Comment;
|
||||
use Filament\Forms\Components\DateTimePicker;
|
||||
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([
|
||||
Select::make('article_id')
|
||||
->label(__('admin.fields.article'))
|
||||
->relationship('article', 'title')
|
||||
->required(),
|
||||
TextInput::make('author')
|
||||
->label(__('admin.fields.author'))
|
||||
->required(),
|
||||
TextInput::make('url')
|
||||
->label(__('admin.fields.url'))
|
||||
->url(),
|
||||
Textarea::make('content')
|
||||
->label(__('admin.fields.content'))
|
||||
->required()
|
||||
->columnSpanFull(),
|
||||
TextInput::make('ip')
|
||||
->label(__('admin.fields.ip')),
|
||||
Select::make('moderation_status')
|
||||
->label(__('admin.fields.moderation_status'))
|
||||
->options([
|
||||
Comment::STATUS_PENDING => __('admin.options.moderation.pending'),
|
||||
Comment::STATUS_PENDING_AI => __('admin.options.moderation.pending_ai'),
|
||||
Comment::STATUS_APPROVED => __('admin.options.moderation.approved'),
|
||||
Comment::STATUS_REJECTED => __('admin.options.moderation.rejected'),
|
||||
Comment::STATUS_NEEDS_HUMAN => __('admin.options.moderation.needs_human'),
|
||||
])
|
||||
->required()
|
||||
->default(Comment::STATUS_PENDING),
|
||||
DateTimePicker::make('published_at')
|
||||
->label(__('admin.fields.published_at')),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user