30 lines
968 B
PHP
30 lines
968 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Fo;
|
|
|
|
use App\Enums\StaticPageType;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\HistoricalMilestone;
|
|
use App\Models\Section;
|
|
use App\Models\Site;
|
|
use App\Models\StaticPage;
|
|
|
|
class StaticPageController extends Controller
|
|
{
|
|
/**
|
|
* Display the 'unveil' page.
|
|
*
|
|
* @return \Illuminate\Contracts\View\View
|
|
*/
|
|
public function unveil(): \Illuminate\Contracts\View\View
|
|
{
|
|
$staticPageModel = StaticPage::query()->where('type', StaticPageType::unveil)->first();
|
|
$sectionModels = Section::query()->where('page_id', $staticPageModel->id)->get();
|
|
$historicalMilestoneModels = HistoricalMilestone::query()
|
|
->orderBy('year', 'ASC')
|
|
->get();
|
|
$siteModel = Site::query()->first();
|
|
|
|
return view('fo.pages.unveil', compact('staticPageModel', 'sectionModels', 'historicalMilestoneModels', 'siteModel'));
|
|
}
|
|
}
|