Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jr. Question #68

Closed
favri opened this issue Dec 5, 2016 · 1 comment
Closed

Jr. Question #68

favri opened this issue Dec 5, 2016 · 1 comment

Comments

@favri
Copy link

favri commented Dec 5, 2016

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.

@hootlex
Copy link
Owner

hootlex commented Mar 28, 2017

Hey, thanks for the kind words. Have you managed to solve your issue?

@hootlex hootlex closed this as completed Apr 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants