mirror of
https://github.com/nihonbuzz/nihonbuzz-academy.git
synced 2026-01-26 13:32:07 +07:00
first commit
This commit is contained in:
46
app/Filament/Admin/Resources/Lessons/Schemas/LessonForm.php
Normal file
46
app/Filament/Admin/Resources/Lessons/Schemas/LessonForm.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\Lessons\Schemas;
|
||||
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class LessonForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('module_id')
|
||||
->relationship('module', 'title')
|
||||
->required(),
|
||||
TextInput::make('title')
|
||||
->required(),
|
||||
TextInput::make('slug')
|
||||
->required(),
|
||||
TextInput::make('type')
|
||||
->required()
|
||||
->default('text'),
|
||||
Textarea::make('content')
|
||||
->columnSpanFull(),
|
||||
TextInput::make('video_url')
|
||||
->url(),
|
||||
TextInput::make('content_pdf'),
|
||||
TextInput::make('duration_seconds')
|
||||
->required()
|
||||
->numeric()
|
||||
->default(0),
|
||||
Toggle::make('is_free_preview')
|
||||
->required(),
|
||||
TextInput::make('order_index')
|
||||
->required()
|
||||
->numeric()
|
||||
->default(0),
|
||||
Textarea::make('metadata')
|
||||
->columnSpanFull(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user