- Upgraded doc intro to match new attribute uses.
This commit is contained in:
1 parent
c9c6a11ebd
commit
36cddf8f78
2 files changed
+29
-19
No files matched your search
+6
-16
@@ -4,7 +4,7 @@ Welcome to the official Ulmus documentation.
|
||||
|
||||
## Quick start
|
||||
|
||||
Creating a simple user entity:
|
||||
Creating a simple user exemple entity:
|
||||
|
||||
*/app/entity/user.php*
|
||||
```php
|
||||
@@ -21,29 +21,19 @@ class User
|
||||
{
|
||||
use \Ulmus\EntityTrait;
|
||||
|
||||
/**
|
||||
* @Id
|
||||
*/
|
||||
#[Field\Id]
|
||||
public int $id;
|
||||
|
||||
/**
|
||||
* @Field
|
||||
*/
|
||||
#[Field]
|
||||
public string $fullname;
|
||||
|
||||
/**
|
||||
* @Field
|
||||
*/
|
||||
#[Field]
|
||||
public ? string $email;
|
||||
|
||||
/**
|
||||
* @Field('name' => 'is_admin')
|
||||
*/
|
||||
#[Field]
|
||||
public bool $isAdmin = false;
|
||||
|
||||
/**
|
||||
* @DateTime
|
||||
*/
|
||||
#[Field\Datetime]
|
||||
public Datetime $birthday;
|
||||
}
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user