Comments (3)
You can just create an endpoint in exactly the way you would when using Laravel - i.e. register a route, write a controller.
If you want to return a JSON:API response from the controller, you can use one of the package's response classes:
https://laraveljsonapi.io/docs/3.0/responses/
from laravel.
Though the answer is perfect (and thanks!), you should always ask yourself, "why this guy asked that?" Or "why this happened" instead closing the ticket.
This note should be added to the "routing" section on the webpage routing.
I asked just because I was doing things wrong, and I couldn't figure that out. can someone add that note?
from laravel.
Hi! yeah, that's fair feedback. In response, I'd say that I find it really stressful having lots of open issues. So that's why I close things that realistically (factoring in everything else I need to do on the package) I'm not going to have time to do anything with.
If you'd like to submit a PR to the docs adding something for this scenario, that would be appreciated.
from laravel.
Related Issues (20)
- Allow morph relationships to define conditional $with attributes HOT 3
- Question - Creating a Related Model and Establishing Relationship HOT 2
- Unable to encode compound document. See previous exception for cause of failure. HOT 7
- eager loading problem HOT 9
- Feature Requests: Inject Scopes middleware option HOT 5
- Best location to add cache for API get requests HOT 2
- Customize top-level meta when fetching related resource HOT 1
- Problem with countables relationships HOT 15
- Incorrect data serialization within ArrayHash (Hashable trait) HOT 1
- [question] Validation on filter values HOT 4
- route model binding (Variable name cannot be longer than 32 characters in route pattern) HOT 9
- How to create resource belongsTo resource in one request? HOT 3
- Controllers cannot be placed in a custom namespace HOT 5
- Rules in a a ResourceRequest are not checked against the Schema's defined fields; no exception thrown for an incorrect Request HOT 2
- [Feature Request] Nesting Filters HOT 1
- Included morph to many data is `null` HOT 5
- Updating a model's relationships where the policy denies updating the relationship gives 200 OK, but doesn't update the relationship HOT 5
- Impossible to change route model binding? HOT 5
- Proper docs for v4.0 and Laravel 11.x HOT 1
- Exception Handling with Laravel 11.x HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel.