```
✨ feat(Product): Ajoute méthode json pour sérialiser les données du produit. ✨ feat(analytics): Intègre suivi Umami pour catalogue, contact et produits. ✨ feat(caddy): Ajoute header Cloudflare et script UTM, améliore config PHP. ✨ feat(nelmio): Autorise tools-security.esy-web.dev dans CSP. ✨ feat(template): Ajoute suivi Umami sur pages catalogue, contact et produit. ```
This commit is contained in:
@@ -80,6 +80,15 @@ class Product
|
||||
return$s->slugify($this->id."-".$this->name);
|
||||
}
|
||||
|
||||
public function json()
|
||||
{
|
||||
return json_encode([
|
||||
'id' => $this->id,
|
||||
'ref' => $this->ref,
|
||||
'name' => $this->name,
|
||||
]);
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
|
||||
Reference in New Issue
Block a user