app/Http/Controllers/InvoicesController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\invoices  $invoices
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request)
    {
        $invoice = invoices::findOrFail($request->invoice_id);
        $invoice->update([
            'invoices_number'=>$request->invoices_number,
            'invoices_date'=>$request->invoices_date,
            'due_date'=>$request->Due_date,
            'section_id'=>$request->section_id,
            'product'=>$request->products,
            'Amount_collection'=>$request->amount_collection,
            'Amount_commission'=>$request->amount_commission,
            'discount'=>$request->discount,
            'rate_vat'=>$request->rate_vat,
            'value_vat'=>$request->value_vat,
            'total'=>$request->total,
            'note'=>$request->note,
        ]);
        session()->flash('edit','تم تعديل الفاتورة');
        return redirect('/invoices');
    }
public function update ( Request $ request ) { $ invoice = invoices :: findOrFail ( $ request -> invoice_id ) ; $ invoice -> update ( [ 'invoices_number' => $ request -> invoices_number , 'invoices_date' => $ request -> invoices_date , 'due_date' => $ request -> Due_date , 'section_id' => $ request -> section_id , 'product' => $ request -> products , 'Amount_collection' => $ request -> amount_collection , 'Amount_commission' => $ request -> amount_commission , 'discount' => $ request -> discount , 'rate_vat' => $ request -> rate_vat , 'value_vat' => $ request -> value_vat , 'total' => $ request -> total , 'note' => $ request -> note , ] ) ; session ( ) -> flash ( 'edit' , 'تم تعديل الفاتورة'); return redirect ( '/invoices' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .