public function form(Form $form): Form
{
return $form
->schema([
Card::make()->schema([
Forms\Components\RichEditor::make('comment')
->required()
->maxLength(255),
Forms\Components\FileUpload::make('attachments')
->directory('comment-attachments/' . date('m-y'))
->maxSize(2000)
->enableDownload(),
])
]);
}
public function table(Table $table): Table
{
return $table
->columns([
Stack::make([
Split::make([
TextColumn::make('user.name')
->translateLabel()
->color('primary')
->weight('bold')
->description(fn (Comments $record): string => $record->created_at, position: 'below')
->grow(false),
]),
TextColumn::make('comment')
->wrap()
->html(),
]),
])
->filters([])
// -- more stuff
}
public function form(Form $form): Form
{
return $form
->schema([
Card::make()->schema([
Forms\Components\RichEditor::make('comment')
->required()
->maxLength(255),
Forms\Components\FileUpload::make('attachments')
->directory('comment-attachments/' . date('m-y'))
->maxSize(2000)
->enableDownload(),
])
]);
}
public function table(Table $table): Table
{
return $table
->columns([
Stack::make([
Split::make([
TextColumn::make('user.name')
->translateLabel()
->color('primary')
->weight('bold')
->description(fn (Comments $record): string => $record->created_at, position: 'below')
->grow(false),
]),
TextColumn::make('comment')
->wrap()
->html(),
]),
])
->filters([])
// -- more stuff
}