@@ -6,36 +6,36 @@ API Platform is **the easiest way** to create **state-of-the-art** web APIs usin
66
77With API Platform, you can:
88
9- - [ expose your Eloquent] ( #exposing-a-model ) models in minutes as:
10- - a REST API implementing the industry-leading standards, formats and best practices:
11- [ JSON-LD] ( https://en.wikipedia.org/wiki/JSON-LD ) /[ RDF] ( https://en.wikipedia.org/wiki/Resource_Description_Framework ) ,
12- [ JSON: API ] ( https://jsonapi.org ) , [ HAL] ( https://stateless.group/hal_specification.html ) , and many
13- RFCs...
14- - a [ GraphQL] ( #enabling-graphql ) API
15- - or both at the same time, with the same code!
16- - automatically expose an [ OpenAPI] ( https://www.openapis.org ) specification (formerly Swagger),
17- dynamically generated from your Eloquent models and always up to date
18- - automatically expose nice UIs and playgrounds to develop using your API
19- ([ Swagger UI] ( https://swagger.io/tools/swagger-ui/ ) and
20- [ GraphiQL] ( https://github.com/graphql/graphiql ) )
21- - automatically paginate your collections
22- - add validation logic using Laravel
23- [ Form Request Validation] ( #write-operations-authorization-and-validation )
24- - add authorization logic using [ gates and policies] ( #authorization )
25- ([ compatible with Sanctum, Passport, Socialite...] ( #authentication ) )
26- - add [ filtering logic] ( #adding-filters )
27- - push changed data to the clients in real-time using Laravel Broadcast and
28- [ Mercure] ( https://mercure.rocks ) (a popular WebSockets alternative, created by Kévin Dunglas,
29- the original author of API Platform) and receive them using Laravel Echo-->
30- - benefits from the API Platform JavaScript tools: [ admin] ( ../admin/index.md ) and
31- [ create client] ( ../create-client/index.md ) (supports Next/React, Nuxt/Vue.js, Quasar, Vuetify
32- and more!)
33- - benefits from native HTTP cache (with automatic invalidation)
34- - boost your app with [ Octane] ( https://laravel.com/docs/octane ) and
35- [ FrankenPHP] ( https://frankenphp.dev ) (the default Octane engine, also created by Kévin)
36- - [ decouple your API from your models] ( ../core/state-providers.md ) and implement patterns such as
37- CQRS
38- - test your API using convenient ad-hoc assertions that work with Pest and PHPUnit
9+ - [ expose your Eloquent] ( #exposing-a-model ) models in minutes as:
10+ - a REST API implementing the industry-leading standards, formats and best practices:
11+ [ JSON-LD] ( https://en.wikipedia.org/wiki/JSON-LD ) /[ RDF] ( https://en.wikipedia.org/wiki/Resource_Description_Framework ) ,
12+ [ JSON: API ] ( https://jsonapi.org ) , [ HAL] ( https://stateless.group/hal_specification.html ) , and many
13+ RFCs...
14+ - a [ GraphQL] ( #enabling-graphql ) API
15+ - or both at the same time, with the same code!
16+ - automatically expose an [ OpenAPI] ( https://www.openapis.org ) specification (formerly Swagger),
17+ dynamically generated from your Eloquent models and always up to date
18+ - automatically expose nice UIs and playgrounds to develop using your API
19+ ([ Swagger UI] ( https://swagger.io/tools/swagger-ui/ ) and
20+ [ GraphiQL] ( https://github.com/graphql/graphiql ) )
21+ - automatically paginate your collections
22+ - add validation logic using Laravel
23+ [ Form Request Validation] ( #write-operations-authorization-and-validation )
24+ - add authorization logic using [ gates and policies] ( #authorization )
25+ ([ compatible with Sanctum, Passport, Socialite...] ( #authentication ) )
26+ - add [ filtering logic] ( #adding-filters )
27+ - push changed data to the clients in real-time using Laravel Broadcast and
28+ [ Mercure] ( https://mercure.rocks ) (a popular WebSockets alternative, created by Kévin Dunglas, the
29+ original author of API Platform) and receive them using Laravel Echo-->
30+ - benefits from the API Platform JavaScript tools: [ admin] ( ../admin/index.md ) and
31+ [ create client] ( ../create-client/index.md ) (supports Next/React, Nuxt/Vue.js, Quasar, Vuetify and
32+ more!)
33+ - benefits from native HTTP cache (with automatic invalidation)
34+ - boost your app with [ Octane] ( https://laravel.com/docs/octane ) and
35+ [ FrankenPHP] ( https://frankenphp.dev ) (the default Octane engine, also created by Kévin)
36+ - [ decouple your API from your models] ( ../core/state-providers.md ) and implement patterns such as
37+ CQRS
38+ - test your API using convenient ad-hoc assertions that work with Pest and PHPUnit
3939
4040Let's discover how to use API Platform with Laravel!
4141
@@ -191,9 +191,9 @@ corresponding API request in the UI. Try it yourself by browsing to
191191
192192So, if you want to access the raw data, you have two alternatives:
193193
194- - Add the correct ` Accept ` header (or don't set any ` Accept ` header at all if you don't care about
195- security) - preferred when writing API clients
196- - Add the format you want as the extension of the resource - for debug purposes only
194+ - Add the correct ` Accept ` header (or don't set any ` Accept ` header at all if you don't care about
195+ security) - preferred when writing API clients
196+ - Add the format you want as the extension of the resource - for debug purposes only
197197
198198For instance, go to ` http://127.0.0.1:8000/api/books.jsonld ` to retrieve the list of ` Book `
199199resources in JSON-LD.
@@ -757,11 +757,11 @@ API Platform hooks into the native
757757
758758It also natively supports:
759759
760- - [ Laravel Sanctum] ( https://laravel.com/docs/sanctum ) , an authentication system for SPAs (single
761- page applications), mobile applications, and simple, token-based APIs
762- - [ Laravel Passport] ( https://laravel.com/docs/passport ) , a full OAuth 2 server
763- - [ Laravel Socialite] ( https://laravel.com/docs/socialite ) , OAuth providers including Facebook, X,
764- LinkedIn, Google, GitHub, GitLab, Bitbucket, and Slack
760+ - [ Laravel Sanctum] ( https://laravel.com/docs/sanctum ) , an authentication system for SPAs (single
761+ page applications), mobile applications, and simple, token-based APIs
762+ - [ Laravel Passport] ( https://laravel.com/docs/passport ) , a full OAuth 2 server
763+ - [ Laravel Socialite] ( https://laravel.com/docs/socialite ) , OAuth providers including Facebook, X,
764+ LinkedIn, Google, GitHub, GitLab, Bitbucket, and Slack
765765
766766Follow the official instructions for the tool(s) you want to use.
767767
0 commit comments