26 lines
868 B
PHP
26 lines
868 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Fo;
|
|
|
|
use App\Enums\StaticPageType;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\GeneralConfig;
|
|
use App\Models\StaticPage;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function index(): \Illuminate\Contracts\View\View
|
|
{
|
|
$configList = GeneralConfig::all()->keyBy(function (GeneralConfig $item) {
|
|
return $item->type->value();
|
|
});
|
|
$legalsStaticPageModel = StaticPage::query()->where('type', StaticPageType::legals)->first();
|
|
$confidStaticPageModel = StaticPage::query()->where('type', StaticPageType::confidentiality)->first();
|
|
return view('fo.pages.home', compact('configList', 'legalsStaticPageModel', 'confidStaticPageModel'));
|
|
}
|
|
}
|