HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/brameda/brameda.nl/app/Komma/Jobs/JobService.php
<?php


namespace App\Komma\Jobs;


use App\Komma\Base\Service;
use Carbon\Carbon;

class JobService extends Service
{

    private $today;

    public function __construct()
    {
        $this->today = Carbon::now()->addHour();
        $this->today = $this->today->format('Y-m-d H:i:s');

        parent::__construct();
    }

    public function getAllJobs($pagination = false, $itemsPerPage = 9)
    {
        $jobs = $this->site
            ->jobs()
            ->with('translation', 'images')
            ->where('active', 1)
            ->whereHas('translation');

        if($pagination)
        {
            $jobs = $jobs->paginate($itemsPerPage);
        }
        else
        {
            $jobs = $jobs->get();
        }
        return $jobs;
    }


}