You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
My bad, released I wasn't including the property as part of my withPivot method options. I can now retrieve stores values in the database, but still can't save values.
public function sites()
{
return $this->belongsToMany(Site::class)->using(DatabaseQuerySite::class)->withTimestamps()->withPivot([
'version', 'query_file', 'template_syntax', 'headers'
]);
}
Edit:
In the end I managed to get the values stored in the database by adding the following code inside by saving observer:
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.
The text was updated successfully, but these errors were encountered: