src/Contracts/Traits/MagicApiMethod.php
protected function getApiMethod()
    {
        if (!isset($this->apiMethod)) {
            $words = explode('_', Str::snake(class_basename($this)), -1);
            $endpoint = strtolower(array_shift($words));
            $action = Str::camel(implode('_', $words)) ?: '*';
            $method = sprintf('%s.%s', $endpoint, $action);
            $this->apiMethod = $endpoint ? $method : 'undefined';
        }

        return $this->apiMethod;
    }
protected function getApiMethod()
    {
        if (!isset($this->apiMethod)) {
            $words = explode('_', Str::snake(class_basename($this)), -1);
            $endpoint = strtolower(array_shift($words));
            $action = Str::camel(implode('_', $words)) ?: '*';
            $method = sprintf('%s.%s', $endpoint, $action);
            $this->apiMethod = $endpoint ? $method : 'undefined';
        }

        return $this->apiMethod;
    }
protected function getApiMethod ( ) { if ( ! isset ( $ this -> apiMethod ) ) { $ words = explode ( '_' , Str :: snake ( class_basename ( $ this ) ) , - 1 ) ; $ endpoint = strtolower ( array_shift ( $ words ) ) ; $ action = Str :: camel ( implode ( '_' , $ words ) ) ? : '*' ; $ method = sprintf ( '%s.%s' , $ endpoint , $ action ) ; $ this -> apiMethod = $ endpoint ? $ method : 'undefined' ; } return $ this -> apiMethod ; }
Get API Method by class name.

@return string
Get API Method by class name .