<?php

namespace App\Controller;

use App\Core\Controller\Site\PageController;
use App\Repository\ProjectRepositoryQuery;
use Symfony\Component\HttpFoundation\Response;

class ProjectController extends PageController
{
    public function projects(ProjectRepositoryQuery $query): Response
    {
        return $this->defaultRender($this->siteRequest->getPage()->getTemplate(), [
            'projects' => $query->create()->published()->ordered()->find(),
        ]);
    }
}
