Skip to content

Commit

Permalink
Fix user_belongsto_role_relationship injection
Browse files Browse the repository at this point in the history
  • Loading branch information
emptynick committed Mar 14, 2019
1 parent 4ee291f commit 7bb2073
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Http/Controllers/VoyagerUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function update(Request $request, $id)
if (app('VoyagerAuth')->user()->getKey() == $id) {
$request->merge([
'role_id' => app('VoyagerAuth')->user()->role_id,
'user_belongsto_role_relationship' => app('VoyagerAuth')->user()->role_id,
'user_belongstomany_role_relationship' => app('VoyagerAuth')->user()->roles->pluck('id')->toArray(),
]);
}
Expand Down

2 comments on commit 7bb2073

@MrCrayon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should work, I'm going to test it.

@MrCrayon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me 👍
Thanks

Please sign in to comment.