How to get current route name in Laravel 5?By Hardik Savani | April 10, 2016 | | 2065 Viewer | Category : Laravel
Share this post:
Whenever you need to get current route name then you can get using Request or Route facade. I give you two example one for using Route facade and another for Request facade. so you can get route name both way and how you can see both example.
$routeName = Request::route()->getName());
$routeName = Route::getCurrentRoute()->getPath();
- Bootstrap notification popup box example using bootstrap-growl JS plugin with demo
- How to add mysql trigger from migrations in Laravel 5?
- How to add charts in Laravel 5 using Chart JS ?
- CRUD (Create Read Update Delete) Example in Laravel 5.2 from Scratch
- How to set multiple selected value in Chosen Jquery Plugin?
- Laravel 5 Repository Pattern Tutorial from scratch
- Laravel 5 manual pagination with array example
- Laravel 5 - Implementing datatables tutorial using yajra package