Closed tobz-nz closed 1 year ago
I've worked out you can add blocks to any Model.
public static function form(Form $form): Form
{
return $form
->schema([
TextInput:make('title'),
Group::make()
->schema([
PageBuilder::make('blocks')
->label(__('filament-fabricator::page-resource.labels.blocks'))
->blocks(FilamentFabricator::getPageBlocks()),
])->columnSpan(2),
]);
}
And add a json field called `blocks to your table.
$table->json('blocks')->nullable();
Seems to work fine, so..? 🤷♂️
Awesome, that works for you! I originally had a different idea than this. Thanks for sharing your idea
Sorry Discussions are disabled so asking this question here instead.
I can't figure out how to add fabricator to my other models - is it fixed to only the provided Pages model? I really want to use it on a number of different models - is this possible?