public function getTransactionName(Request $request)
    {
        $route = $request->route();

        if (is_array($route)) {
            // Try the assigned controller action
            if (isset($route[1]) && isset($route[1]['uses'])) {
                return $route[1]['uses'];
            } // Try named routes
            elseif (isset($route[1]) && isset($route[1]['as'])) {
                return $route[1]['as'];
            }
        }

        return 'index.php';
    }
public function getTransactionName(Request $request)
    {
        $route = $request->route();

        if (is_array($route)) {
            // Try the assigned controller action
            if (isset($route[1]) && isset($route[1]['uses'])) {
                return $route[1]['uses'];
            } // Try named routes
            elseif (isset($route[1]) && isset($route[1]['as'])) {
                return $route[1]['as'];
            }
        }

        return 'index.php';
    }
public function getTransactionName ( Request $ request ) { $ route = $ request -> route ( ) ; if ( is_array ( $ route ) ) { // Try the assigned controller action if ( isset ( $ route [ 1 ] ) && isset ( $ route [ 1 ] [ 'uses' ] ) ) { return $ route [ 1 ] [ 'uses' ] ; } // Try named routes elseif ( isset ( $ route [ 1 ] ) && isset ( $ route [ 1 ] [ 'as' ] ) ) { return $ route [ 1 ] [ 'as' ] ; } } return 'index.php' ; }
Builds the transaction name. It will return the assigned controller action first, then the route name before
falling back to just "index.php"

@param Request $request

@return string
Builds the transaction name . It will return the assigned controller action first then the route name before falling back to just index . php