Laravel 5 : How to get path name from URL?
<p>In laravel , I come across a situation where I need to get the path name from url.</p>

<p>e.g.</p>

<blockquote>
  <p>www.example.com/timeslot</p>
</blockquote>

<p>In above example I want to fetch "timeslot" in my controller </p>

<pre><code>public function login()
{
$url = URL::current();
echo "timeslot"; //I want to print only "timeslot" here.
}
</code></pre>