Initial commit

This commit is contained in:
Ronald Huynen
2026-03-23 21:37:59 +01:00
commit 2547717edb
2193 changed files with 972171 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class SearchController extends Controller
{
public function show(Request $request)
{
$authId = Auth::guard('web')->id();
$key = 'main_search_bar_results_' . $authId;
$data = cache()->get($key, ['results' => [], 'searchTerm' => null, 'total' => 0,]);
$resultRefs = $data['results'];
$searchTerm = $data['searchTerm'];
$total = $data['total'];
// empty cache when retrieved
// cache()->forget($key);
return view('search.show', [
'resultRefs' => $resultRefs,
'searchTerm' => $searchTerm,
'total' => $total,
]);
}
}