1 year ago

Call to a member function update() on array?? laravel 5.6

Posted 1 year ago by belykia

Hello Everybody: I am getting this error "Call to a member function update() on array" and I have no idea why, is it because I am updating an array? I have check other resources similar to this but not much related to array so I am not sure what to do. Thank you in advance

Controller: $post=Post::find($id); $post=$request->all(); $ASNumber = $request->input('asnumber'); $choice=$request->input('choices'); $peeringDB=$request->input('peeringdb'); $ASSET =$request->input('assets'); $Contact=$request->input('Contacts'); $post_data = [ 'asnumber' => $ASNumber, 'peeringrs' => $choice, 'peeringdb' => $peeringDB, 'asset' => $ASSET, 'contact' => $Contact ]; $post->update($post_data); return redirect('save');

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