app/Http/Controllers/Backsite/SpecialistController.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(UpdateSpecialistRequest $request, Specialist $specialist)
    {
        $data = $request->all();
        $data['price'] = str_replace(',', '', $data['price']);
        $data['price'] = str_replace('IDR ', '', $data['price']);
        $specialist->update($data);
        alert()->success('Success Message', 'Successfully updated specialist');
        return redirect()->route('backsite.specialist.index');
    }
public function update ( UpdateSpecialistRequest $ request , Specialist $ specialist ) { $ data = $ request -> all ( ) ; $ data [ 'price' ] = str_replace ( ',' , '' , $ data [ 'price' ] ) ; $ data [ 'price' ] = str_replace ( 'IDR ' , '' , $ data [ 'price' ] ) ; $ specialist -> update ( $ data ) ; alert ( ) -> success ( 'Success Message' , 'Successfully updated specialist' ) ; return redirect ( ) -> route ( 'backsite.specialist.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// get all request from frontsite // update to database