Commit c52ca975 authored by Micheal Mand's avatar Micheal Mand Committed by Nicolas Widart

Return User when creating with roles (#261)

Signed-off-by: 's avatarMicheal Mand <micheal@kmdwebdesigns.com>
parent 02d28978
...@@ -64,6 +64,7 @@ class SentinelUserRepository implements UserRepository ...@@ -64,6 +64,7 @@ class SentinelUserRepository implements UserRepository
* @param array $data * @param array $data
* @param array $roles * @param array $roles
* @param bool $activated * @param bool $activated
* @return User
*/ */
public function createWithRoles($data, $roles, $activated = false) public function createWithRoles($data, $roles, $activated = false)
{ {
...@@ -73,6 +74,8 @@ class SentinelUserRepository implements UserRepository ...@@ -73,6 +74,8 @@ class SentinelUserRepository implements UserRepository
if (!empty($roles)) { if (!empty($roles)) {
$user->roles()->attach($roles); $user->roles()->attach($roles);
} }
return $user;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment