app/Http/Controllers/Backsite/ConfigPaymentController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(UpdateConfigPaymentRequest $request, ConfigPayment $config_payment)
    {
        $data = $request->all();
        $data['fee'] = str_replace(',', '', $data['fee']);
        $data['fee'] = str_replace('IDR ', '', $data['fee']);
        $data['vat'] = str_replace(',', '', $data['vat']);
        $config_payment->update($data);
        alert()->success('Success Message', 'Successfully updated config payment');
        return redirect()->route('backsite.config_payment.index');
    }
public function update ( UpdateConfigPaymentRequest $ request , ConfigPayment $ config_payment ) { $ data = $ request -> all ( ) ; $ data [ 'fee' ] = str_replace ( ',' , '' , $ data [ 'fee' ] ) ; $ data [ 'fee' ] = str_replace ( 'IDR ' , '' , $ data [ 'fee' ] ) ; $ data [ 'vat' ] = str_replace ( ',' , '' , $ data [ 'vat' ] ) ; $ config_payment -> update ( $ data ) ; alert ( ) -> success ( 'Success Message' , 'Successfully updated config payment' ) ; return redirect ( ) -> route ( 'backsite.config_payment.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// get all request from frontsite // re format before push to table // update to database