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/SBogers10/kemi.komma.pro/app/KommaApp/Jobs/JobService.php
<?php


namespace App\KommaApp\Jobs;


use App\KommaApp\Jobs\Models\Job;
use Carbon\Carbon;

class JobService
{

    public function getAllJobs($pagination = false, $itemsPerPage = 9)
    {

        $jobs = Job::where('active', '1')
            ->with('translation', 'images')
            ->with('translation.route')
            ->orderBy('created_at');

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

}