filament-fabricator
filament-fabricator copied to clipboard
[Documentation]: Schema Slots Feature
Note: this feature is implemented just need to be documented
If you add custom columns to Page Model you can use schema slots to add additional fields to the Page Resource Form, without overriding it.
Example:
use Z3d0X\FilamentFabricator\Facades\FilamentFabricator;
// in boot of a service provider
FilamentFabricator::registerSchemaSlot('sidebar.after', [
TextInput::make('seo_title'),
Textarea::make('seo_description'),
]);
Available Schema Slots:
-
blocks.before
-
blocks.after
-
sidebar.before
-
sidebar.before
Should we deprecate this feature in favor of overriding the resource, for more control?
Should we deprecate this feature in favor of overriding the resource, for more control?
That would be amazing @Z3d0X. Overriding the Resource would provide more flexibility
@itamarack. it's already possible https://github.com/Z3d0X/filament-fabricator/blob/50f0cc63d86f327d124f380ebb27057f66fce6b4/config/filament-fabricator.php#L38
@itamarack. it's already possible
https://github.com/Z3d0X/filament-fabricator/blob/50f0cc63d86f327d124f380ebb27057f66fce6b4/config/filament-fabricator.php#L38
I'll just check my installation again. I tried creating a page resource and use it but it keep throwing some sort of error. I'll check again. Thank you @Z3d0X
@itamarack. it's already possible
https://github.com/Z3d0X/filament-fabricator/blob/50f0cc63d86f327d124f380ebb27057f66fce6b4/config/filament-fabricator.php#L38
@Z3d0X It worked! Thanks a lot!
@Nicolascanala you'd need to create migration and those columns to pages
table
@Nicolascanala you'd need to create migration and those columns to
pages
table
Thanks! I noticed literally 2 mins after posting this comment lol. Hadn't noticed that I had the migration published. Thanks!