How to get current route name in Laravel 5?By Hardik Savani | April 10, 2016 | | 12582 Viewer | Category : Laravel
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();
- Pixel tracking code php example
- How to create middleware for XSS protection in laravel 5?
- How to get soft deleted records in Laravel 5?
- How to use soft delete in Laravel 5?
- How to convert array values to lowercase in PHP?
- Laravel 5.5 - Validation Data Return - New Feature
- How to quick run laravel project?
- How to get last executed mysql query in laravel ?