API Error: getRelationships does not exist.

habyb-fernandes

Aug 7th, 2019 08:09 AM

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

Aug 7th, 2019 11:25 AM

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

Aug 7th, 2019 03:23 PM

Hi @tnylea,

Laravel Framework 5.8.8

Thanks.

charles-ongaya

Sep 4th, 2019 06:40 PM

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

Sep 4th, 2019 08:08 PM

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

charles-ongaya

Sep 5th, 2019 02:27 PM

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

Sep 7th, 2019 10:36 AM

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

Sep 14th, 2019 10:53 AM

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

thony-carol

Oct 7th, 2019 03:09 AM

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

david-smith-1

Feb 18th, 2020 05:31 PM

Has there been ANY support for this? I am a premium member and I am haveing the same issue!

eduard-olariu

Feb 20th, 2020 10:33 AM

This guy is not answering hi's a jackass my issue is 5 moths old and no answear