|
@@ -12,7 +12,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
|
|
|
class ViewController extends AbstractController
|
|
|
{
|
|
|
#[Route('/post/{slug}', name: 'app_view')]
|
|
|
- #[IsGranted('view', 'article')]
|
|
|
+ #[IsGranted('view', 'article', 'Article non trouvé', 404)]
|
|
|
public function index(
|
|
|
#[MapEntity(mapping: ['slug' => 'slug'])]
|
|
|
Article $article
|