File: D:/HostingSpaces/SBogers10/beat-the-barn.komma.nl/app/Projects/ProjectService.php
<?php
namespace App\Projects;
use App\Base\Service;
use App\Projects\Models\Project;
use Carbon\Carbon;
class ProjectService 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 allProjects()
{
$projectsQuery = Project::with('translation', 'images', 'categories')
->where('active', 1)
->orderBy('lft')
->whereHas('translation');
return $projectsQuery;
}
}