Skip to content

Commit

Permalink
Update docs for Entity to include all . Fixes #1061
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Jun 25, 2018
1 parent 1a86f86 commit f5382d1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions user_guide_src/source/database/entities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ simply map the ``full_name`` column in the database to the ``$name`` property, a
protected $_options = [
'datamap' => [
'full_name' => 'name'
]
],
'dates' => ['created_at', 'updated_at', 'deleted_at'],
'casts' => []
];
}

Expand Down Expand Up @@ -289,6 +291,8 @@ You can define which properties are automatically converted by adding the name t

protected $_options = [
'dates' => ['created_at', 'updated_at', 'deleted_at'],
'casts' => [],
'datamap' => []
];
}

Expand Down Expand Up @@ -327,7 +331,9 @@ For example, if you had a User entity with an **is_banned** property, you can ca
protected $_options = [
'casts' => [
'is_banned' => 'boolean'
]
],
'dates' => ['created_at', 'updated_at', 'deleted_at'],
'datamap' => []
];
}

Expand All @@ -349,7 +355,9 @@ you can cast properties into, the **array** cast type will serialize the value w
protected $_options = [
'casts' => [
'options' => 'array'
]
],
'dates' => ['created_at', 'updated_at', 'deleted_at'],
'datamap' => []
];
}

Expand Down

0 comments on commit f5382d1

Please sign in to comment.