File: D:/HostingSpaces/SBogers10/beerten.komma.nl/app/References/ReferenceService.php
<?php
namespace App\References;
use App\Base\Service;
use App\References\Models\Reference;
use Carbon\Carbon;
final class ReferenceService 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();
}
private function baseQuery()
{
return Reference::with('translation')
->where('active', 1)
->orderBy('created_at','desc');
}
public function getAllReferences()
{
return $this->baseQuery()->get();
}
}