File tree Expand file tree Collapse file tree 5 files changed +8
-5
lines changed
Expand file tree Collapse file tree 5 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 22All notable changes to this project will be documented in this file. This project adheres to
33[ Semantic Versioning] ( http://semver.org/ ) and [ this changelog format] ( http://keepachangelog.com/ ) .
44
5- ## 2.x
5+ ## [ 2.0.0-beta.1 ] - 2020-03-04
66
77### Added
88- [ #348 ] ( https://github.com/cloudcreativity/laravel-json-api/issues/348 )
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ A demo application is available at [here](https://github.com/cloudcreativity/dem
6262
6363| Laravel | This Package |
6464| --- | --- |
65- | ` ^7.0 ` | ` ^ 2.0` |
65+ | ` ^7.0 ` | ` 2.0.0-beta.1 ` |
6666| ` ^6.0 ` | ` ^1.0 ` |
6767| ` 5.8.* ` | ` ^1.0 ` |
6868| ` 5.7.* ` | ` ^1.0 ` |
Original file line number Diff line number Diff line change 7777 }
7878 }
7979 },
80- "minimum-stability" : " dev " ,
80+ "minimum-stability" : " stable " ,
8181 "prefer-stable" : true ,
8282 "config" : {
8383 "sort-packages" : true
Original file line number Diff line number Diff line change @@ -161,7 +161,8 @@ Accept: application/vnd.api+json
161161 "type": "posts",
162162 "attributes": {
163163 "title": "Hello World",
164- "content": "..."
164+ "content": "...",
165+ "another-field": "..."
165166 },
166167 "relationships": {
167168 "author": {
@@ -195,6 +196,7 @@ Your validator will be provided with the following array of data:
195196 "id" => null,
196197 "title" => "Hello World",
197198 "content" => "...",
199+ "another-field" => "...",
198200 "author" => ["type" => "users", "id" => "123"],
199201 "tags" => [
200202 ["type" => "tags", "id" => "1"],
@@ -221,6 +223,7 @@ class Validators extends AbstractValidators
221223 return [
222224 'title' => 'required|string|min:1|max:255',
223225 'content' => 'required|string|min:1',
226+ "another-field" => 'string|unique:posts,another_field',
224227 'author' => [
225228 'required',
226229 new HasOne('users'),
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ public function getJobs()
243243 }
244244
245245 /**
246- * @return ContainerInterface|null
246+ * @return ContainerInterface
247247 */
248248 public function getContainer ()
249249 {
You can’t perform that action at this time.
0 commit comments