2024-03-07 11:38:29 +01:00
|
|
|
<?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
|
|
|
|
|
*/
|
2024-03-14 10:09:22 +01:00
|
|
|
public function show(): \Illuminate\Contracts\View\View
|
2024-03-07 11:38:29 +01:00
|
|
|
{
|
|
|
|
|
$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'));
|
|
|
|
|
}
|
|
|
|
|
}
|