Laravel API Management system

Fusio is an open source API management system which helps to build state of the art REST APIs. It provides out of the box features like OAuth2 authorization, Rate limiting, OpenAPI support, Webhooks and SDK generation. For more information about Fusio and to see whether it is useful for you please take a look at the GitHub project.

If you have already a Laravel app and want to build an API based on it or if you like to use Eloquent you want to take a look at the Fusio Laravel adapter. This adapter integrates features of Laravel into Fusio. To install the adapter at your project you need to install it first with:

composer require fusio/adapter-laravel
php bin/fusio system:register "Fusio\Adapter\Laravel\Adapter"

Then you need to create a new Eloquent connection at the Fusio backend.

After this it is possible to use this connection inside your action. This means it is possible to use Eloquent inside your API endpoint logic:

Through this it is also possible to use all your Eloquent models inside a Fusio action. In this case you need to add your models to Fusio either through composer or by adding them to your Fusio src/ folder. Also if you develop a new API you can simply use all your Eloquent knowledge to build your endpoints.

Since Eloquent gets only booted in case you use the “Eloquent” connection, all other actions are not affected. This means also you can only use the static methods in case you have used the connection. In this way you can easily mix different actions to build your API, i.e. you can use the SQL-Table action to directly create an API based on a table and also create custom actions using Eloquent.

I hope this example has shown you how easily you can use Fusio as a Laravel developer. For more information about Fusio please take a look at the website or the GitHub project.

I am a developer in the API space, currently working on Fusio an open source API management platform

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store