api
A RESTful API package for the Laravel and Lumen frameworks.
A PHP package for building web APIs on Laravel and Lumen that handles versioning, authentication, rate limiting, and response formatting out of the box, now moved to a new GitHub organization.
Dingo API is a PHP package designed to help developers build web APIs on top of the Laravel and Lumen frameworks. An API (Application Programming Interface) is the layer that lets different software systems communicate with each other, for example when a mobile app sends a request to a server to fetch user data. Dingo provides the scaffolding so you do not have to build that layer from scratch.
The package handles several concerns that come up repeatedly when building APIs. Content negotiation means the server can respond in different formats depending on what the client requests. Authentication adapters let you plug in different login or token verification strategies. API versioning allows you to release a new version of your API without breaking older clients that still rely on the previous version. Rate limiting controls how many requests a single client can make in a given time window, which protects your server from overload. Response transformers let you shape the data before it goes back to the caller, and there is built-in error handling to return consistent error messages.
The package also supports internal requests, where one part of your application can call another API endpoint without going through the network, and it can generate API Blueprint documentation, which is a structured description of your API's endpoints.
Note: the README states that this repository is no longer actively maintained at this location. The project has moved to a different GitHub organization (api-ecosystem-for-laravel), and users are asked to switch to that repository instead. The code and history here remain accessible, but new development happens elsewhere.
The package is licensed under the BSD 3-Clause license, which permits broad use and redistribution with minimal restrictions. Documentation is available in the project's wiki.
Where it fits
- Add API versioning to a Laravel app so existing clients keep working when you release a new API version.
- Implement rate limiting on your Laravel API endpoints to protect the server from overload.
- Use response transformers to control exactly what data your API returns to different types of clients.