Trying to use the Items field within a BelongtoMany field, and the inputted values aren't being passed in the request.
BelongsToMany::make('Individual Site Queries', 'sites', SiteResource::class)->fields(function () {
return [
Text::make('Version', 'version')->sortable()->readonly(),
Text::make('Query File', 'query_file')->hideWhenCreating()->readonly()->sortable(),
Boolean::make('Template Syntax', 'template_syntax')->sortable()->help('Does this query support Array injection via PHP variables?'),
Items::make('Headers', 'headers')->draggable(),
Code::make('SQL Query')->resolveUsing(function () {
return isset($this->pivot) && $this->pivot->query_file ? Storage::get($this->pivot->query_file) : null;
})->rules('required')->language('sql')->temporary(),
];
}),
Have tried referencing column via sites.headers and leaving second parameter blank, but always get the same output. No error on frontend however field in database doesn't update. Works outside of BelongsToMany field though just fine.
Trying to use the Items field within a BelongtoMany field, and the inputted values aren't being passed in the request.
Have tried referencing column via sites.headers and leaving second parameter blank, but always get the same output. No error on frontend however field in database doesn't update. Works outside of BelongsToMany field though just fine.