You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Hootlex. First of all, thank you very much for all the hard work on this project.
I'm new to coding, and i'm having some issues i wish you can help me.
In mi UserController.php i have:
public function view($id)
{
$user = User::find(Auth::user()->id);
$recipient = User::find($id);
$posts = Post::where("user_id", "=", $recipient->id)->get();
return view('userviews.userfriend', compact('user', 'posts','recipient'));
}
My problem is that when visiting a profile page, for example: http://localhost:8000/23 (where 23 is the id) if i'm visiting the profile page of the logged user, both $user and $recipient are the same id and then it's impossible to use the acceptRequest and so on functions.
How can i solve this?
Sorry if the question it's to stupid, and thank you for your time.
The text was updated successfully, but these errors were encountered:
Hi Hootlex. First of all, thank you very much for all the hard work on this project.
I'm new to coding, and i'm having some issues i wish you can help me.
In mi UserController.php i have:
public function view($id)
{
$user = User::find(Auth::user()->id);
$recipient = User::find($id);
$posts = Post::where("user_id", "=", $recipient->id)->get();
return view('userviews.userfriend', compact('user', 'posts','recipient'));
}
My problem is that when visiting a profile page, for example: http://localhost:8000/23 (where 23 is the id) if i'm visiting the profile page of the logged user, both $user and $recipient are the same id and then it's impossible to use the acceptRequest and so on functions.
How can i solve this?
Sorry if the question it's to stupid, and thank you for your time.
The text was updated successfully, but these errors were encountered: