- Laravel Version: 8.36.2
- Nova Version: 3.22.0 / 3.23.1
- PHP Version: 7.4.16
- Database Driver & Version: sqlite / pgsql
- Operating System and Version: MacOS
- Browser type and version: Firefox 87.0
Description:
When using BelongsTo Field you can show a "+ Create" button to create a new related model concerned by the field (showCreateRelationButton()method)
This button opens a modal with the form, but the HTTP request that request the form do not pass the viaResource & viaResourceId (& viaRelationship) values.
Detailed steps to reproduce the issue on a fresh Nova installation:
Create two Models
- the First with a
BelongsTo relationship to the second
- The Second with (or not) a relationship to the First model (
HasOne or HasMany)
- Creates the related nova Resources and Fields
- Use the
showCreateRelationButton option on the BelongsTo field on the First model
- Try to create a new First model, and from the creation form, click on the "+ Create" on the right of the select dropdown
- On the browser console, The request to get the Second model form do not pass the viaResource & viaResourceId (& viaRelationship) values.