Benjacho / belongs-to-many-field-nova

Belongs To Many field Laravel nova to represent many to many relationship in field.
MIT License
157 stars 81 forks source link

Don't use $request->$attribute #61

Closed infostreams closed 3 years ago

infostreams commented 4 years ago

If you use $request->$attribute, and $attribute is (for example) files, then the save will fail entirely because $request->files already exists as a public property on the Request model.

To prevent this from happening, and because something like 'files' is a very common name, we need to start using $request->input() and $request->except(). If not, this plugin will fail in strange ways if you use it on a field called 'files', 'searchable', 'polling', 'with', 'title', 'group', ...

infostreams commented 3 years ago

@Benjacho Merge or comment please