Skip to content

Commit f7c79c0

Browse files
committed
Merge branch 'release/4.0.0'
2 parents a4a7db1 + 9c4bbc3 commit f7c79c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+23235
-16
lines changed

.vuepress/4.0.js

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
module.exports = [
2+
{
3+
title: 'Getting Started',
4+
collapsable: false,
5+
children: prefix('getting-started', [
6+
'',
7+
'upgrade',
8+
'core-concepts',
9+
'directory-structure',
10+
]),
11+
},
12+
{
13+
title: 'Tutorial',
14+
collapsable: true,
15+
children: prefix('tutorial', [
16+
'',
17+
'02-models',
18+
'03-server-and-schemas',
19+
'04-relationships',
20+
'05-creating-resources',
21+
'06-modifying-resources',
22+
'07-deleting-resources',
23+
'08-fetching-resources',
24+
]),
25+
},
26+
{
27+
title: 'Servers',
28+
collapsable: false,
29+
children: prefix('servers', [
30+
'',
31+
'events',
32+
]),
33+
},
34+
{
35+
title: 'Schemas',
36+
collapsable: false,
37+
children: prefix('schemas', [
38+
'',
39+
'identifier',
40+
'attributes',
41+
'relationships',
42+
'eager-loading',
43+
'sorting',
44+
'pagination',
45+
'filters',
46+
'soft-deleting',
47+
]),
48+
},
49+
{
50+
title: 'Routing',
51+
collapsable: false,
52+
children: prefix('routing', [
53+
'',
54+
'controllers',
55+
'writing-actions',
56+
'custom-actions',
57+
]),
58+
},
59+
{
60+
title: 'Requests',
61+
collapsable: false,
62+
children: prefix('requests', [
63+
'',
64+
'authorization',
65+
'compliance',
66+
'resources',
67+
'query-parameters',
68+
]),
69+
},
70+
{
71+
title: 'Responses',
72+
collapsable: false,
73+
children: prefix('responses', [
74+
'',
75+
'errors',
76+
]),
77+
},
78+
{
79+
title: 'API Resources',
80+
collapsable: false,
81+
children: prefix('resources', [
82+
'',
83+
'attributes',
84+
'relationships',
85+
'meta',
86+
'links',
87+
]),
88+
},
89+
{
90+
title: 'Digging Deeper',
91+
collapsable: false,
92+
children: prefix('digging-deeper', [
93+
'artisan',
94+
'countable',
95+
'localisation',
96+
'proxies',
97+
'non-eloquent',
98+
'polymorphic-to-many',
99+
]),
100+
},
101+
{
102+
title: 'Testing',
103+
collapsable: false,
104+
children: prefix('testing', [
105+
'',
106+
'resources',
107+
'relationships',
108+
'requests',
109+
'assertions',
110+
]),
111+
}
112+
];
113+
114+
function prefix(prefix, children) {
115+
return children.map(child => `${prefix}/${child}`)
116+
}

.vuepress/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ module.exports = {
4040
text: "Version",
4141
link: "/",
4242
items: [
43+
{
44+
text: "4.x",
45+
link: "/4.0/"
46+
},
4347
{
4448
text: "3.x",
4549
link: "/3.0/"
@@ -59,6 +63,7 @@ module.exports = {
5963
"/1.0/": require("./1.0"),
6064
"/2.0/": require("./2.0"),
6165
"/3.0/": require("./3.0"),
66+
"/4.0/": require("./4.0"),
6267
},
6368
},
6469

1.0/schemas/eager-loading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function fields(): array
4848
}
4949
```
5050

51-
With a default depth of `1`, the client will be allowed to to request
51+
With a default depth of `1`, the client will be allowed to request
5252
the following include paths:
5353

5454
- `user`

2.0/schemas/eager-loading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function fields(): array
4848
}
4949
```
5050

51-
With a default depth of `1`, the client will be allowed to to request
51+
With a default depth of `1`, the client will be allowed to request
5252
the following include paths:
5353

5454
- `user`

2.0/schemas/pagination.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,9 +794,9 @@ class PostSchema extends Schema
794794
/**
795795
* Get the resource paginator.
796796
*
797-
* @return PagePagination
797+
* @return MultiPagination
798798
*/
799-
public function pagination(): PagePagination
799+
public function pagination(): MultiPagination
800800
{
801801
return new MultiPagination(
802802
PagePagination::make(),
@@ -817,4 +817,4 @@ The multi-pagination will use the page parameters supplied
817817
by the client to decide which paginator to use for the
818818
request. This means you must have at least one unique page
819819
parameter per paginator you provide to the `MultiPagination`
820-
class.
820+
class.

3.0/digging-deeper/non-eloquent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ class SiteRepository extends AbstractRepository implements QueriesAll
639639
public function queryAll(): Capabilities\QuerySites
640640
{
641641
return Capabilities\QuerySites::make()
642-
->withServer($this->server)
643-
->withSchema($this->schema);
642+
->withServer($this->server())
643+
->withSchema($this->schema());
644644
}
645645

646646
}

3.0/schemas/eager-loading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function fields(): array
4848
}
4949
```
5050

51-
With a default depth of `1`, the client will be allowed to to request
51+
With a default depth of `1`, the client will be allowed to request
5252
the following include paths:
5353

5454
- `user`

3.0/schemas/pagination.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,9 +794,9 @@ class PostSchema extends Schema
794794
/**
795795
* Get the resource paginator.
796796
*
797-
* @return PagePagination
797+
* @return MultiPagination
798798
*/
799-
public function pagination(): PagePagination
799+
public function pagination(): MultiPagination
800800
{
801801
return new MultiPagination(
802802
PagePagination::make(),
@@ -817,4 +817,4 @@ The multi-pagination will use the page parameters supplied
817817
by the client to decide which paginator to use for the
818818
request. This means you must have at least one unique page
819819
parameter per paginator you provide to the `MultiPagination`
820-
class.
820+
class.

4.0/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Introduction
2+
3+
Laravel JSON:API helps you easily implement [JSON:API](https://jsonapi.org)
4+
specification-compliant APIs to your Laravel applications.
5+
6+
Full details of the JSON:API specification can be found on their
7+
[website](https://jsonapi.org).
8+
9+
## Features
10+
11+
Laravel JSON:API provides all the capabilities you need to add JSON:API
12+
compliant APIs to your Laravel application. We have extensive support for the
13+
full specification, including:
14+
15+
- Content negotiation
16+
- Fetching resources
17+
- Fetching relationships
18+
- Inclusion of related resources (compound documents)
19+
- Sparse field sets
20+
- Sorting
21+
- Pagination
22+
- Filtering
23+
- Creating resources
24+
- Updating resources
25+
- Updating relationships
26+
- Deleting resources
27+
- Validation of:
28+
- JSON:API documents for compliance with the specification; and
29+
- Query parameters.
30+
31+
This includes full out-of-the box support for querying Eloquent resources,
32+
with features such as:
33+
34+
- Automatic eager loading when using JSON:API include paths
35+
- Simple definition of filters and sort parameters
36+
- Easy relationship end-points
37+
- Pagination of resources.
38+
39+
And finally, we have an extensive range of test helpers: to make
40+
test driven development a breeze.
41+
42+
## Get Started
43+
44+
Get start by heading to the [installation guide.](./getting-started)
45+
46+
Or if you're new to JSON:API or want a great intro the Laravel JSON:API, then
47+
try our [tutorial.](./tutorial)

0 commit comments

Comments
 (0)