How to get current route name in Laravel 5?By Hardik Savani | April 10, 2016 | | 7440 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();
- Jquery highlight search text in div using highlight JS with example
- How to add LIKE query in Elasticsearch?
- How to get current controller or method name in Codeigniter ?
- How to merge two array with same keys without loop in PHP ?
- How to create scroll to top of the page by jquery animate ?
- How to install composer using command line in ubuntu ?
- How to create and use Middleware in Laravel 5?
- How to get filename without extension in PHP?