Download the PHP package laravel-enso/api without Composer

On this page you can find all versions of the php package laravel-enso/api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api

API

Stable Downloads Issues Merge Requests

Description

API is Laravel Enso's reusable package for external service integrations and inbound API request logging.

It provides a small action-based client on top of Laravel's HTTP client, optional SOAP transport through PHP's SoapClient, reusable contracts for authentication, retries, query parameters, file uploads, form payloads, and timeouts. On top of that, it standardizes inbound and outbound API logging, admin notifications for failed calls, and small payload-building helpers used across Enso integrations.

Installation

This package comes pre-installed in Laravel Enso distributions that integrate external services or expose protected internal API endpoints.

For standalone package installation inside an Enso-based application:

The package auto-registers its service provider, loads its migrations, and registers:

Run the migrations after installation:

If you need to inspect raw request and response traffic during integration work, enable the debug flag in your environment:

Features

::: tip Tip If an endpoint implements UsesAuth and the first response is 401 or 403, Api::call() refreshes the token once through the token provider before continuing with the normal retry flow. :::

Usage

Outbound action

Define a small endpoint class that describes the request:

Wrap it in an Action and call handle():

SOAP action

SOAP integrations use the same Action orchestration and logging flow. Extend the optional SOAP endpoint base class when the operation can be represented by wsdl(), operation(), and arguments():

Then return the SOAP endpoint from an action:

SOAP responses are wrapped in SoapResponse. Failed SOAP calls return a failed response internally, are logged, trigger the normal notification flow, and then throw the original SoapFault from handle().

Inbound logging

Use the standalone middleware alias when you only want request logging:

Or use Enso's core-api middleware group when the route also needs active-state checks, permission checks, and localisation handling:

Resource and filter helpers

Use Resource when a payload needs nested resource resolution and mandatory attribute validation:

Use Filter when you want to reject unsupported keys before sending them to the remote service:

API

Core classes

Contracts

Required contract:

Optional contracts:

::: warning Note SOAP support is additive. Existing HTTP endpoints keep using the same Endpoint contract and Api client behavior. Applications only need the PHP SOAP extension when they actually use SoapEndpoint. :::

Middleware

Log model and storage

LaravelEnso\Api\Models\Log

Stored attributes:

Relationships and casts:

Logging directions:

API Logs table

The package provides the System > API Logs table through:

Permissions:

The table defaults to api_logs.created_at desc, exposes created_at as a datetime column, displays resolved users and permissions, and supports filters for user, permission, method, direction, and creation datetime.

Upgrade notes

This release changes the public logging enum contract:

After updating the package, run:

Resource, filter, and throttle helpers

::: warning Note Inbound logging reports any non-200 response through ApiCallError, while outbound actions report failed responses and thrown exceptions through the same notification pipeline.

The notification handler targets active Enso admins and queues the email on the notifications queue. :::

Depends On

Required Enso packages:

Framework dependency:

Contributions

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!


All versions of api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel-enso/core Version ^12.0
laravel-enso/enums Version ^3.0
laravel-enso/helpers Version ^4.0
laravel-enso/localisation Version ^5.0
laravel-enso/menus Version ^5.0
laravel-enso/mails Version ^1.0
laravel-enso/migrator Version ^2.0
laravel-enso/permissions Version ^5.0
laravel-enso/rememberable Version ^4.0
laravel-enso/tables Version ^5.0
laravel-enso/upgrade Version ^2.0
laravel-enso/users Version ^2.0
laravel/framework Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laravel-enso/api contains the following files

Loading the files please wait ...