You can get the current action name using Route::currentRouteAction() . Unfortunately, this method will return the full name of the class with the names. So you get something like:
App\Http\Controllers\ FooBarController@method
Then just highlight the method name and controller name:
$currentAction = \Route::currentRouteAction(); list($controller, $method) = explode('@', $currentAction); // $controller now is "App\Http\Controllers\FooBarController" $controller = preg_replace('/.*\\\/', '', $controller); // $controller now is "FooBarController"
source share