The RelationField is assuming the foreign key is the tablename_id. Although this is probably most common, its not always the case (as in mine!). This means that any foreign key that does not follow this format will break the query :(
In the HasMnayField class it does the following
$baseModel = new $baseModel;
$primaryKey = $baseModel->getKeyName();
...
$item->{$primaryKey};
And option would be to use Laravel relation method getPlainForeignKey
The
RelationField
is assuming the foreign key is thetablename_id
. Although this is probably most common, its not always the case (as in mine!). This means that any foreign key that does not follow this format will break the query :(In the
HasMnayField
class it does the followingAnd option would be to use Laravel relation method
getPlainForeignKey
I made these changes and the forms display correctly, although I don't have enough time to properly test, hopefully somebody can do this :)