Skip to content

Commit 783643c

Browse files
committed
wip
1 parent da05ddb commit 783643c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Http/Controllers/ProfileAvatarController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public function __invoke(ProfileAvatarRequest $request)
2323
$user->{$request::$userAvatarAttribute} = $path;
2424
$user->save();
2525

26-
return $this->response()->data($user->fresh());
26+
27+
$user->{ProfileAvatarRequest::$userAvatarAttribute} = url($user->{ProfileAvatarRequest::$userAvatarAttribute});
28+
29+
return $this->response()->data($user);
2730
}
2831
}

src/Http/Controllers/ProfileController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public function __invoke(RestifyRequest $request)
1515
$user->{ProfileAvatarRequest::$userAvatarAttribute} = url($user->{ProfileAvatarRequest::$userAvatarAttribute});
1616
}
1717

18-
return $this->response()->data($request->user());
18+
return $this->response()->data($user);
1919
}
2020
}

0 commit comments

Comments
 (0)