Installation¶
The recommended way to install the library is via Composer.
Requirements¶
- PHP: 8.1 or higher.
- Composer: For dependency management.
Installation¶
Obtaining an API Token¶
To use this library, you must have a valid API token from alerts.in.ua.
- Go to devs.alerts.in.ua.
- Fill out the application form.
- Your personal token will be sent to you via email.
Security
Keep your API token secret. Do not commit it to public repositories. Use environment variables (e.g., .env files) to store sensitive credentials.
Integration Frameworks¶
Symfony¶
You can register the client as a service in services.yaml:
services:
Fyennyi\AlertsInUa\Client\AlertsClient:
arguments:
$token: '%env(ALERTS_IN_UA_TOKEN)%'
$cache: '@cache.app' # Optional: Use Symfony's cache pool
Laravel¶
You can bind the client in a ServiceProvider: