The Rise of Contactless Payments:...
In recent years, contactless payments have surged in popularity, driven...
<?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!']]);
}
}
Blog Section
Dive into our blog to explore the cutting-edge trends in digital payments and NFC technology. Stay updated on the innovations that are revolutionizing transactions, boosting security, and making payments quicker and more convenient. Learn how these advancements are shaping the future of financial interactions and driving the global transition towards a cashless world.
In recent years, contactless payments have surged in popularity, driven...
As digital transactions proliferate, ensuring robust payment security is more critical than ever. Two foundational...
Digital wallets have fundamentally transformed how we manage money, offering a streamlined, secure, and highly...