src/Controller/Customer/DefaultController.php line 13
<?phpnamespace App\Controller\Customer;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;#[Route('/customer')]class DefaultController extends AbstractController{#[Route('/', name: 'customer_default')]public function index(\App\Repository\CustomerRepository $customerRepository,\App\Repository\Customer\ProjectRepository $projectRepository,\App\Repository\Customer\BidRepository $bidRepository,\App\Repository\Customer\InvoiceRepository $invoiceRepository,\App\Repository\Customer\ConversationMessageRepository $conversationMessageRepository): Response {$customer = $customerRepository->findOneBy(['user' => $this->getUser()]);$totalProjects = $projectRepository->getTotalCustomer($customer);$latestProjects = $projectRepository->getLatestCustomer($customer);$totalBids = $bidRepository->getTotalCustomer($customer);$latestBids = $bidRepository->getLatestCustomer($customer);$totalSpent = $invoiceRepository->getTotalCustomer($customer);$latestMessages = $conversationMessageRepository->getLatestCustomer($customer);return $this->render('customer/default/index.html.twig', ['customer' => $customer,'totalProjects' => $totalProjects,'latestProjects' => $latestProjects,'totalBids' => $totalBids,'latestBids' => $latestBids,'totalSpent' => $totalSpent,'latestMessages' => $latestMessages]);}}