laravel-6
“Call to undefined function str_slug()” in Laravel 6.0
If you have gone through the upgrade guide then you must know that String and Array Helpers have been removed from Core Framework So if if You need to still use the helper install the package composer require laravel/helpers and all the helpers are moved to this package
Laravel: How to Get Current Route Name? (v5 … v7)
Try this Route::getCurrentRoute()->getPath(); or \Request::route()->getName() from v5.1 use Illuminate\Support\Facades\Route; $currentPath= Route::getFacadeRoot()->current()->uri(); Laravel v5.2 Route::currentRouteName(); //use Illuminate\Support\Facades\Route; Or if you need the action name Route::getCurrentRoute()->getActionName(); Laravel 5.2 route documentation Retrieving The Request URI The path method returns the request’s URI. So, if the incoming request is targeted at http://example.com/foo/bar, the path method will return foo/bar: $uri … Read more