protected function getJsMethod($method)
    {
        $methods = [
            'get' => 'read',
            'post' => 'create',
            'put' => 'update',
            'delete' => 'delete',
        ];
        return isset($methods[strtolower($method)]) ? $methods[strtolower($method)] : 'read';
    }
protected function getJsMethod($method)
    {
        $methods = [
            'get' => 'read',
            'post' => 'create',
            'put' => 'update',
            'delete' => 'delete',
        ];
        return isset($methods[strtolower($method)]) ? $methods[strtolower($method)] : 'read';
    }
protected function getJsMethod ( $ method ) { $ methods = [ 'get' => 'read' , 'post' => 'create' , 'put' => 'update' , 'delete' => 'delete' , ] ; return isset ( $ methods [ strtolower ( $ method ) ] ) ? $ methods [ strtolower ( $ method ) ] : 'read' ; }
Do the correspondence behind js method and http methods

@param  String $method
@return String
Do the correspondence behind js method and http methods