You use laravel 5 version for your web application, so it will be helpful for you. Get URL segment value use request()->segment(); in you controller page.
For example:
if you URL is http://localhost/Mylaravel/public/edit_page/11
and you get 11 from the link so use this code:
echo request()->segment(2);
if you use
echo request()->segment(1); So it’s display edit_page Or use
echo request()->segment(3); So it display blank
Question and answer is powered by AnsPress.io