codeistalk
1 year ago

Undefined property: Illuminate\Database\Query\Builder::$map

Posted 1 year ago by codeistalk

HI

This is the first time I am dealing with API Resources in Laravel. I have create Resource Collection and using it's default definition. Changed nothing.

With pagination it's working awesome. When I call /model/{id}, it gives error

Undefined property: Illuminate\Database\Query\Builder::$map

I have added a screenshot of error too.

http://www.openscreenshot.com/#/i/B1ziEDVaf

public function show(Language $language) {
        return new LanguageCollection($language);
    }

Thanks

Please sign in or create an account to participate in this conversation.