title: how to get id in url and display it in a form laravel 5
body: <p>i have this href that leads you to addeditvisit/.(the chosen row's id)</p>
  
  <pre><code>&lt;td&gt;&lt;a href="{{ URL::to('addeditvisit/'.$patient-&gt;pID) }}"&gt;&lt;img src="images/visit.png" style="width:30px; height:30px;"&gt;&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>so the url looks something like this <a href="http://localhost:8000/addeditvisit/5" rel="nofollow">http://localhost:8000/addeditvisit/5</a></p>
  
  <p>and inside it is a form. where i want to include the $patient->pID and make it a value of my hidden input so that i can include it saving the form.</p>
  
  <p>in my controller I coded this:</p>
  
  <pre><code>$uri = $request-&gt;path();
  return View::make('pages.addeditvisit', ['uri'=&gt;$uri]);
  </code></pre>
  
  <p>in my form i have this input text first instead of hidden to display what really is the value and it is displays </p>
  
  <pre><code>addeditvisit/5
  </code></pre>
  
  <p>what i really want is to only get the 5. what function should i use? Please help me, i'm just new in Laravel 5 and still learning</p>