cart_data = $request->base64_encode(json_encode(session('cart'))); $checkout->payer_name = $request->payer_name; $checkout->payment_option = $request->payment_option; $checkout->status = $request->status; if ($checkout->save()) return redirect()->route('instructor.index')->with('success', 'Data Saved'); else return redirect()->back()->withInput()->with('error', 'Please try again'); } catch (Exception $e) { // dd($e); return redirect()->back()->withInput()->with('error', 'Please try again'); } } /** * Display the specified resource. */ public function show(Checkout $checkout) { // } /** * Show the form for editing the specified resource. */ public function edit(Checkout $checkout) { // } /** * Update the specified resource in storage. */ public function update(Request $request, Checkout $checkout) { // } /** * Remove the specified resource from storage. */ public function destroy(Checkout $checkout) { // } }