Download the PHP package azima/laravel-esl without Composer
On this page you can find all versions of the php package azima/laravel-esl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azima/laravel-esl
More information about azima/laravel-esl
Files in azima/laravel-esl
Package laravel-esl
Short Description A Laravel package for Azima ESL connection.
License MIT
Homepage https://github.com/Mahmoudalziem/Azima-larave-esl
Informations about the package laravel-esl
Laravel ESL
A Laravel package for connecting to and interacting with a Azima ESL (Event Socket Library) server.
Features
- Easy configuration for Azima ESL connection details.
- Fluent API for sending commands to Azima.
- Handles connection and authentication automatically.
- Provides a
Eslfacade for convenient access. - Includes a custom exception for robust error handling.
- Automatic resource management (disconnection).
Installation
You can install the package via Composer:
The package will automatically register its service provider and facade.
Configuration
To publish the configuration file, run the following command:
This will create a config/esl.php file in your application's config directory. You can then configure your Azima ESL connection details in your .env file:
Usage
You can interact with the Azima ESL server in two primary ways:
Using the Esl Facade
The Esl facade provides a quick and easy way to send commands.
Using a Custom Connection
For situations where you need to connect to a different Azima server on-the-fly, you can use the connection() method before executing a command. This will not affect the default connection configuration.
Available Command Methods
The package provides the following helper methods for common API commands to make your code more readable.
For any command that does not have a dedicated helper method, you can use the execute() method directly:
Using Dependency Injection
You can also type-hint the EslConnection class in your controllers or other classes to have it automatically injected by Laravel's service container.
Response Parsing
Currently, the execute method returns the raw response body from the Azima API command. Future versions will include a more sophisticated parser to return structured data.
License
The MIT License (MIT). Please see License File for more information.