Skip to content

Commit e80cba7

Browse files
committed
[ci skip] Correction of the entity instantiation
1 parent b9a6417 commit e80cba7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

user_guide_src/source/models/entities.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Now that all of the pieces are in place, you would work with the Entity class as
9696
$userModel->save($user);
9797

9898
// Create
99-
$user = new App\Entities\User();
99+
$user = new \App\Entities\User();
100100
$user->username = 'foo';
101101
$user->email = 'foo@example.com';
102102
$userModel->save($user);
@@ -122,7 +122,7 @@ on your entities without worrying much about stray fields getting saved incorrec
122122

123123
$data = $this->request->getPost();
124124

125-
$user = new App\Entities\User();
125+
$user = new \App\Entities\User();
126126
$user->fill($data);
127127
$userModel->save($user);
128128

@@ -132,7 +132,7 @@ You can also pass the data in the constructor and the data will be passed throug
132132

133133
$data = $this->request->getPost();
134134

135-
$user = new App\Entities\User($data);
135+
$user = new \App\Entities\User($data);
136136
$userModel->save($user);
137137

138138
Handling Business Logic
@@ -291,7 +291,7 @@ You can define which properties are automatically converted by adding the name t
291291
Now, when any of those properties are set, they will be converted to a Time instance, using the application's
292292
current timezone, as set in **app/Config/App.php**::
293293

294-
$user = new App\Entities\User();
294+
$user = new \App\Entities\User();
295295

296296
// Converted to Time instance
297297
$user->created_at = 'April 15, 2017 10:30:00';

0 commit comments

Comments
 (0)