-
Couldn't load subscription status.
- Fork 16
Troubleshooting
Laravel offers the possibility to inject model objects in the controller methods:
-
First, bind the route to the model in your routes.php (example of User).
-
When you build your request, you need to set the object id field (integer for SQL) or _id field (string for MongoDB) where the {object} is.
-
Then, it will search for the user in the database and inject it in the controller (as a User object). (For example: .../v1/users/55/show) If the object identifier is not found, you will get a 404 response message.
Using this filter makes sure the user uses as valid access token to access the route. The access token is returned to you as the key field at the end of the authentication.