<?php namespace Lc\SovBundle\Doctrine\Extension; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; trait SluggableTrait { /** * @ORM\Column(type="string", length=255) * @Gedmo\Slug(fields={"title"}, unique=true) */ protected $slug; public function getSlug(): ?string { return $this->slug; } public function setSlug(?string $slug): self { $this->slug = $slug; return $this; } }