24 lines
518 B
PHP
24 lines
518 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\FaqQuestion;
|
|
use App\Models\FaqTheme;
|
|
|
|
class FAQController extends Controller
|
|
{
|
|
/**
|
|
* index
|
|
*
|
|
* @return \Illuminate\View\View
|
|
*/
|
|
public function index()
|
|
{
|
|
$questions = FaqQuestion::all();
|
|
$themes = FaqTheme::all();
|
|
if (count($questions) === 0 && count($themes) === 0) {
|
|
return redirect()->route('home');
|
|
}
|
|
return view('theme::fo.faq', compact('questions', 'themes'));
|
|
}
|
|
}
|