Skip to content

Instantly share code, notes, and snippets.

@parijke

parijke/Test.php

Created Aug 20, 2020
Embed
What would you like to do?
Use the EntityIdTrait
<?php
namespace App\Entity;
use App\Entity\Traits\EntityIdTrait;
use App\Repository\TestRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TestRepository::class)
*/
class Test
{
use EntityIdTrait;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.