feat: FAQ controller made
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user