Using an eloquent query for the form

I am using to compose the table, the model "component_pivot", while for the form I would need to use the model component, how can I do that?

protected static ?string $model = Component_pivot::class;

For the form I would need to use this eloquent query:

\App\Models\Component::with('component_pivot')->where('group_id', '1')->get()
Was this page helpful?