Skip to content

Commit 6e90d24

Browse files
committed
new example added
1 parent 1e1bf3b commit 6e90d24

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Then, to load the plugin either run the following command:
2020
bin/cake plugin load JsonApiException
2121
```
2222

23-
or manually add the following line to your app's `src/Application.php `file's `bootstrap()` function:
23+
or manually add the following line to your app's `src/Application.php` file's `bootstrap()` function:
2424

2525
```php
2626
$this->addPlugin('JsonApiException');
@@ -43,6 +43,7 @@ public function add()
4343
$user = $this->Users->patchEntity($user, $this->request->getData());
4444
if (!$this->Users->save($user)) {
4545
throw new JsonApiException($user, 'Save failed');
46+
// throw new JsonApiException($user, 'Save failed', 418); // you set the response's status code in the 3rd parameter
4647
}
4748
}
4849
$this->set(compact('user'));

0 commit comments

Comments
 (0)