/home/kueuepay/public_html/app/Http/Controllers/Admin/CookieController.php
<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\Admin\SiteSections;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;

class CookieController extends Controller
{
    /**
     * Display a listing of the resource.
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $page_title = "GDPR Cookie";
        $site_cookie = SiteSections::siteCookie();
        return view('admin.sections.cookie.index',compact(
            'page_title',
            'site_cookie',
        ));
    }
    /**
     * Update the specified resource in storage.
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request)
    {
        $validator = Validator::make($request->all(),[
            'status'    => 'required|numeric',
            'link'      => 'required|string',
            'desc'      => 'required|string|max:50000',
        ]);

        $validated = $validator->validate();
        $type = 'site_cookie';

        $status = [
            '0'     => false,
            '1'     => true,
        ];
        $validated['status'] = $status[$validated['status']];

        // Insert bata into batabase
        try{
            SiteSections::updateOrCreate(['key' => $type],['key' => $type , 'value' => $validated, 'status' => $validated['status']]);
        }catch(Exception $e) {
            return back()->with(['error' => ['Something went worng! Please try again.']]);
        }

        return back()->with(['success' => ['Cookie information updated successfully!']]);
    }
}
Save Card
top

Save Your Card for Quick and Easy Future Payments Online

Simplify your payment experience by securely saving your card on our platform. After your initial transaction, you can choose to store your card details safely for future use. This feature eliminates the need to re-enter your payment information each time, making checkouts faster while keeping your data secure with advanced encryption and robust security measures.

  • Navigate to the “Save Card” section.
  • Click on “Add Card.”
  • Choose your preferred setup method.
  • Your card is now saved for future payments.
img