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/fire-tech/fire-tech.nl/app/KommaApp/Clients/ClientService.php
<?php


namespace App\KommaApp\Clients;


use App\KommaApp\Clients\Models\Client;
use Carbon\Carbon;

class ClientService
{

    public function getAllClients($pagination = false, $itemsPerPage = 6)
    {

        $clients = \App::getSite()
            ->clients()
            ->with('images')
            ->where('active', 1)
            ->where('lft', '!=', 1)
            ->orderBy('lft','asc');

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


}