selahattinunlu / laravel-api-query-builder

Laravel & Lumen Api Query Builder Package
331 stars 66 forks source link

RequestCreator #32

Closed robsontenorio closed 7 years ago

robsontenorio commented 7 years ago

Laravel 5.5

Endpoint: /decks/{id}

I just want to merge "id" in request object. I have tried $request->merge(['id '=> $id]), but i got error from Laravel. So I have tried:

 public function show(Request $request, $id)
    {
        $request = $request->all();
        $request['id'] = $id;
        $request = RequestCreator::createWithParameters($request);

        return Deck::get($request);
    }

Error

Undefined index: PATH_INFO