Friday, March 10, 2017

Laravel $request with variable returns null

I am writing an update methoda for my api. I neede to update requested fields. So ı am trying to get only requested fields and update them. However, the code below returns me null even thougs i cast $fil to string.

        foreach ($fillableFields as $fill){
            $customerId->$fill = $request->$fill ;



via hjvj

Advertisement