armancs
1 month ago

Non-static method Illuminate\Database\Eloquent\Model::update() should not be called statically

Posted 1 month ago by armancs

Got this error when trying to update eloquent data.

Controller :

     public function update(Request $request, $id)
        {
         Invoices::update($request->all());
             Invoiceslist::whereId($id)->update($request->all());
         return redirect()->back();
     }

I am trying to update two table data called invoices and invoices list. there is multiple data against one invoices id.

Help me please

thanks

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