1

I have added this command

 php artisan help make:filament-relation-manager ProductResource tags name

and added in ProductResource

public static function getRelations(): array
    {
        return [
            TagsRelationManager::class
        ];
    }

the relation manager is shown successfully in the edit product page, but not shown in the create page. How I can display it in the create page as well?

  • I don't think it's not possible, in your use-case why you want to show in create page? That relationship will not know where to add/update those relations if you provide in create – Vpa Jun 26 '23 at 07:11

1 Answers1

1

Relation Manager actually works with existing records.

Why It's working with the Edit record

  • It's working on the Edit page because the record exists and then using that record you can attach/detach and add new records using the relationships

Why it will not work with the create record

  • It will not work on the Create page because the record is not created, so it will not be clear for which record it will attach/detach or sync with.

Hope it will clear your doubt

Mitesh Rathod
  • 879
  • 5
  • 18