app/Http/Controllers/Backsite/SpecialistController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(StoreSpecialistRequest $request)
    {
        $data = $request->all();
        $data['price'] = str_replace(',', '', $data['price']);
        $data['price'] = str_replace('IDR ', '', $data['price']);
        $specialist = Specialist::create($data);
        alert()->success('Success Message', 'Successfully added new specialist');
        return redirect()->route('backsite.specialist.index');
    }
public function store ( StoreSpecialistRequest $ request ) { $ data = $ request -> all ( ) ; $ data [ 'price' ] = str_replace ( ',' , '' , $ data [ 'price' ] ) ; $ data [ 'price' ] = str_replace ( 'IDR ' , '' , $ data [ 'price' ] ) ; $ specialist = Specialist :: create ( $ data ) ; alert ( ) -> success ( 'Success Message' , 'Successfully added new specialist' ) ; return redirect ( ) -> route ( 'backsite.specialist.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// get all request from frontsite // re format before push to table // store to database