Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 431 Bytes

File metadata and controls

19 lines (14 loc) · 431 Bytes

Singleton

Add a singleton entity where only one entity can be created or new entities cannot be created if one or more already exists.

This is good for an app configuration saved in the database

use the Singleton attribute on your entity class

use Rami\EntityKitBundle\Common\Attributes\Singleton

#[Singleton]
class Blog 
{
  // properties omitted
}

This prevents new entities of type Blog from being created.