Skip to content

Commit cdda621

Browse files
author
Sander Koenders
committed
Refactor(Relation): Add foreign key variables
In Laravel 5.4 you're required to fill these out if your table structure is different from the default Laravel guessing algoritm
1 parent d05fd5e commit cdda621

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Entrust/Traits/EntrustPermissionTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait EntrustPermissionTrait
1919
*/
2020
public function roles()
2121
{
22-
return $this->belongsToMany(Config::get('entrust.role'), Config::get('entrust.permission_role_table'));
22+
return $this->belongsToMany(Config::get('entrust.role'), Config::get('entrust.permission_role_table'), Config::get('entrust.permission_foreign_key'), Config::get('entrust.role_foreign_key'));
2323
}
2424

2525
/**

0 commit comments

Comments
 (0)