API Error: getRelationships does not exist.

Posted In Wave
  • habyb-fernandes 4 months ago
    line 48
    /Users/habyb/www/html/dev/vacina/wave/src/Http/Controllers/API/ApiController.php
    $dataTypeContent = $this->resolveRelations($dataTypeContent, $dataType);
    
    Error:
    Method Wave\Http\Controllers\API\ApiController::getRelationships does not exist.

    line 48 /Users/habyb/www/html/dev/vacina/wave/src/Http/Controllers/API/ApiController.php $dataTypeContent = $this->resolveRelations($dataTypeContent, $dataType);

    Error: Method Wave\Http\Controllers\API\ApiController::getRelationships does not exist.

  • tnylea 3 months ago
    Are you using Laravel 5.7 or 5.8. Additionally can you tell me what version of Voyager is installed. You can find this by searching `tcg/voyager` in your `composer.lock` file.
    
    Let me know :)
    
    Thanks!

    Are you using Laravel 5.7 or 5.8. Additionally can you tell me what version of Voyager is installed. You can find this by searching tcg/voyager in your composer.lock file.

    Let me know :)

    Thanks!

  • habyb-fernandes 3 months ago
    Hi @tnylea,
    
    Laravel Framework 5.8.8
    
    Thanks.

    Hi @tnylea,

    Laravel Framework 5.8.8

    Thanks.

  • charles-ongaya 3 months ago
    Hi, I am having a problem with this as well. The api does not let me retrieve the user profile settings.
    
    Method Wave\Http\Controllers\API\ApiController::getRelationships does not exist.

    Hi, I am having a problem with this as well. The api does not let me retrieve the user profile settings.

    Method Wave\Http\Controllers\API\ApiController::getRelationships does not exist.

  • charles-ongaya 3 months ago
    is there any explanation for this? I can't access standard routes, for the api that i created with bread.
    

    is there any explanation for this? I can't access standard routes, for the api that i created with bread.

  • charles-ongaya 3 months ago
    Where is support? This application is broken, and i just bought it...is someonearound in this form? Even premium members are not getting a response.

    Where is support? This application is broken, and i just bought it...is someonearound in this form? Even premium members are not getting a response.

  • eduard-olariu 2 months ago
    you can add this to the BreadRelationshipParser trait  it fixes the route issus but on relationships it dosen't seem to work
    
    
    				 protected function getRelationships(DataType $dataType)
        {
            // dd($dataType);
            $relationships = [];
    
            $dataType->browseRows->each(function ($item) use (&$relationships) {
               
                $details = $item->details;
                print_r
                if (isset($details->relationship) && isset($item->field)) {
                    $relation = $details->relationship;
                    if (isset($relation->method)) {
                        $method = $relation->method;
                        $this->relation_field[$method] = $item->field;
                    } else {
                        $method = camel_case($item->field);
                    }
    
                    $relationships[$method] = function ($query) use ($relation) {
                        // select only what we need
                        if (isset($relation->method)) {
                            return $query;
                        } else {
                            $query->select($relation->key, $relation->label);
                        }
                    };
                }
            });
    
            return $relationships;
        }

    you can add this to the BreadRelationshipParser trait it fixes the route issus but on relationships it dosen't seem to work

    			 protected function getRelationships(DataType $dataType)
    {
        // dd($dataType);
        $relationships = [];
    
        $dataType->browseRows->each(function ($item) use (&$relationships) {
           
            $details = $item->details;
            print_r
            if (isset($details->relationship) && isset($item->field)) {
                $relation = $details->relationship;
                if (isset($relation->method)) {
                    $method = $relation->method;
                    $this->relation_field[$method] = $item->field;
                } else {
                    $method = camel_case($item->field);
                }
    
                $relationships[$method] = function ($query) use ($relation) {
                    // select only what we need
                    if (isset($relation->method)) {
                        return $query;
                    } else {
                        $query->select($relation->key, $relation->label);
                    }
                };
            }
        });
    
        return $relationships;
    }
    
  • eduard-olariu 2 months ago
    i have the same issue .... i sent a email to him and no answear, no nothing 

    i have the same issue .... i sent a email to him and no answear, no nothing

  • thony-carol 2 months ago
    I'm also facing the issue, please help me to resolve this issue. [Myfirstpremiercard](https://www.myfirstpremiercard.us/)

    I'm also facing the issue, please help me to resolve this issue. Myfirstpremiercard

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
Want to create your own SAAS?

I can teach you to create your own Software as a Service. Click here to learn more!

Visit SAAS Adventure!