belongs-to-many-field-nova
belongs-to-many-field-nova copied to clipboard
Added allow to create related resource
Resolve issue #28
A new method has been added:
- Method creatable(), This method allows you to create related resource
// simple
BelongsToManyField::make('Participants', 'participant', 'App\Nova\Participant')
->creatable(),
// with settings
BelongsToManyField::make('Participants', 'participant', 'App\Nova\Participant')
->creatable('Create new participant', ['additional_participant_field' => 'value']),
Used tagging functionality: https://vue-multiselect.js.org/#sub-tagging
Looks great, in what scenario do you need this feature?
I created a fork just to get this functionality. I have the same use case (needing to create a new related resource). Would advise to merge.