Loading src/Controller/HomeController.php +4 −3 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use App\Validation\{ArrayValidation, DateValidation}; use DateTimeImmutable; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Attribute\Route; Loading Loading @@ -87,7 +88,7 @@ class HomeController extends AbstractController return $this->json($fridays); } #[Route('/func7/{startDate}/{endDate}', name: 'home')] // 01-01-2024 #[Route('/func7/{startDate}/{endDate}', name: 'func7')] // 01-01-2024 public function func7(string $startDate, string $endDate): Response { if (DateValidation::validate($startDate) && DateValidation::validate($endDate)) { Loading @@ -104,8 +105,8 @@ class HomeController extends AbstractController return new Response("Invalid date format"); } #[Route('/{fileName}', name: 'home')] public function home(string $fileName): Response // text.txt #[Route('/func8/{fileName}', name: 'func8')] public function func8(string $fileName): Response // text.txt { $filePath = $this->getParameter('kernel.project_dir') . "/public/files/"; $text = $this->functions->readLogFile($filePath . $fileName); Loading Loading
src/Controller/HomeController.php +4 −3 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use App\Validation\{ArrayValidation, DateValidation}; use DateTimeImmutable; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Attribute\Route; Loading Loading @@ -87,7 +88,7 @@ class HomeController extends AbstractController return $this->json($fridays); } #[Route('/func7/{startDate}/{endDate}', name: 'home')] // 01-01-2024 #[Route('/func7/{startDate}/{endDate}', name: 'func7')] // 01-01-2024 public function func7(string $startDate, string $endDate): Response { if (DateValidation::validate($startDate) && DateValidation::validate($endDate)) { Loading @@ -104,8 +105,8 @@ class HomeController extends AbstractController return new Response("Invalid date format"); } #[Route('/{fileName}', name: 'home')] public function home(string $fileName): Response // text.txt #[Route('/func8/{fileName}', name: 'func8')] public function func8(string $fileName): Response // text.txt { $filePath = $this->getParameter('kernel.project_dir') . "/public/files/"; $text = $this->functions->readLogFile($filePath . $fileName); Loading