feat: FAQ controller made
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
2025-10-27 15:18:31 +05:45
parent db9315ad22
commit 48e089d3c8
13 changed files with 274 additions and 3 deletions

View File

@@ -80,7 +80,15 @@ class HomeController extends Controller
public function faq()
{
return Inertia::render('faq');
$faq = FAQ::all();
$faqResponse = $faq->map(function ($item) {
return [
"id" => $item->id,
"question" => $item->question,
"answer" => $item->answer,
];
});
return Inertia::render('faq', ['faq' => $faqResponse]);
}
}