miguilimzero / filament-auto-panel

Construct your Filament panel Resources and Relation Managers at execution time like magic.
MIT License
26 stars 4 forks source link

How to add group #1

Closed hazhayder closed 7 months ago

hazhayder commented 10 months ago

I really like this particular Filament plugin created an admin panel in under 60 mins, The only problem I am facing at the moment is I am using SEO package https://filamentphp.com/plugins/ralphjsmit-seo which returns a SEO group how can I use that inside this?

miguilimzero commented 10 months ago

Hello @hazhayder , you can try to extend the form function and customize it with the extra fields you want. Something like this (check the AutoResource class file for better understanding):

public static function form(Form $form): Form
{
        return $form
            ->schema([
                SEO::make(), // Your custom field
                ...FormGenerator::make(
                        modelClass: static::getModel(), 
                        overwriteColumns: static::getColumnsOverwriteMapped('form'),
                        enumDictionary: static::$enumDictionary,
                )
        ])
        ->columns(2);
}
hazhayder commented 8 months ago

Hello @hazhayder , you can try to extend the form function and customize it with the extra fields you want. Something like this (check the AutoResource class file for better understanding):

public static function form(Form $form): Form
{
        return $form
            ->schema([
                SEO::make(), // Your custom field
                ...FormGenerator::make(
                        modelClass: static::getModel(), 
                        overwriteColumns: static::getColumnsOverwriteMapped('form'),
                        enumDictionary: static::$enumDictionary,
                )
        ])
        ->columns(2);
}

Thanks this worked

Issa-projects commented 7 months ago

I see, thank you