FrozenNode / Laravel-Administrator

An administrative interface package for Laravel
http://administrator.frozennode.com/
MIT License
1.94k stars 504 forks source link

Fixed bugs in filtering and editing fields in relationship #1049

Open SeptimusLiu opened 7 years ago

SeptimusLiu commented 7 years ago

There is some bugs when I use the type "relationship" in edit_fields and filters in model config file, it will update the id fields instead of the foreign key I've set in belongsTo('\App\Models\MtrGroup', 'foreign_key', 'local_key'). Details for issue can be seen on https://github.com/FrozenNode/Laravel-Administrator/issues/1048 This commit fixed bugs above for me, and I hope it can be merged and prevent similiar problems.