lundi 5 juin 2017

Laravel using user id in route

So I have a route profile/{user_id}

How do I redirect user to that URL when they click on link?

Here's my controller:

{
    function checkid($user_id) {
      if (Auth::check())
      {
        $user_id = Auth::id();
        return view('profile', [
        'id' => $user_id
        ]);
      }
    }
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire