The fastest way to make a powerful JSON:API compatible Rest API with Laravel.
MIT License
Bot releases are hidden (Show)
Published by binaryk over 2 years ago
Restify already provides powerful filters and get routes with relationships. However, sometimes you might want to get some extra data for your repositories.
Let's say you have a stripe user. This is how you retrieve the stripe user information through a get request:
Route::get('users/stripe-information', UserStripeController::class);
// UserStripeController.php
public function __invoke(Request $request)
{
...
}
The classic
approach is good, however, it has a few limitations. Firstly, you have to manually take care of the route middleware
, the testability for these endpoints should be done separately which is hard to maintain. And finally, the endpoint is disconnected from the repository, which makes it feel out of context so has a bad readability.
So, code readability, testability and maintainability become hard.
Published by binaryk over 2 years ago
skipFieldFill
in actions, so you can keep default behavior for actionable fields.Published by binaryk almost 3 years ago
Published by binaryk almost 3 years ago
Published by binaryk almost 3 years ago
Published by binaryk almost 3 years ago
Published by binaryk almost 3 years ago
Published by binaryk almost 3 years ago
Forgot
Published by binaryk almost 3 years ago
Published by binaryk almost 3 years ago
rules
method for actions and deprecated payload
Route::restifyAuth()
macro to intantiate auth routes.Published by binaryk almost 3 years ago
Published by binaryk almost 3 years ago
AuthController
as it's a breaking change for a minor release.Published by binaryk almost 3 years ago
AuthController
as it's a breaking change for a minor release.Published by binaryk almost 3 years ago
include
along with related
to get relationships.Published by binaryk almost 3 years ago
Published by binaryk almost 3 years ago
action
testing helper.Published by binaryk almost 3 years ago
ok()
global helperPublished by binaryk about 3 years ago
Published by binaryk about 3 years ago
stored
hook in the repository.