How to return back the page after saving data??

Posted 1 year ago by hecate0211
/**
     * Store a new user.
     *
     * @param  Request  $request
     * @param  int  $id
     * @return Response
     */
        public function saveJson(Request $request, $id)
        {
          
            DB::table('rabs')->insert(
                    ['pekerjaan_id' => $id, 'no' => '1', 'uraian_pekerjaan'=>'tes', 'volume' => '123', 'satuan' => 'qwe', 'harga' => '123', 'jumlah' =>'3']);
            
            return back();


        }

this is my code, but after i try return back(), my page doesnt back to the previous page.. but i check in inspect element in network tabs, my page is back to my previous page can u help me??

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