Skip to content

nkt/doctrine-columns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Doctrine columns

Why?

Because stop copy-paste code. Reuse it!

How!?

Just use column-trait, that you need.

use Nkt\Column;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="books")
 */
class Book
{
    use Column\Id;
    use Column\Name;
    use Column\Description;
    use Column\Price;

    public function __construct($name, $description)
    {
        $this->setName($name);
        $this->setDescription($description);
    }
}

How I can help?

Add your popular column and get rid of copy-paste!

License

MIT