ldc-volena/app/Http/Controllers/Fo/HireController.php
2024-03-14 15:25:29 +01:00

29 lines
967 B
PHP

<?php
namespace App\Http\Controllers\Fo;
use App\Enums\StaticPageType;
use App\Enums\Testimonials\TypeEnum;
use App\Http\Controllers\Controller;
use App\Models\JobVideo;
use App\Models\Section;
use App\Models\StaticPage;
use App\Models\Testimonial;
class HireController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Contracts\View\View
*/
public function show(): \Illuminate\Contracts\View\View
{
$staticPageModel = StaticPage::query()->where('type', StaticPageType::we_hire)->first();
$sectionModels = Section::query()->where('page_id', $staticPageModel->id)->get();
$videoModels = JobVideo::query()->inRandomOrder()->simplePaginate(4);
$testimonialModels = Testimonial::query()->where('type', TypeEnum::hire)->get();
return view('fo.pages.hire', \compact('staticPageModel', 'sectionModels', 'videoModels', 'testimonialModels'));
}
}