render('favorite/index.html.twig'); } #[Route(path: '/timesheet/add/{id}', name: 'favorites_timesheets_add', methods: ['GET'])] #[IsGranted('start_own_timesheet')] public function add(Timesheet $timesheet, FavoriteRecordService $favoriteRecordService): Response { $favoriteRecordService->addFavorite($timesheet); return $this->render('favorite/index.html.twig'); } #[Route(path: '/timesheet/remove/{id}', name: 'favorites_timesheets_remove', methods: ['GET'])] #[IsGranted('start_own_timesheet')] public function remove(Timesheet $timesheet, FavoriteRecordService $favoriteRecordService): Response { $favoriteRecordService->removeFavorite($timesheet); return $this->render('favorite/index.html.twig'); } }