Please note!
We only include the endpoints necessary for the team's projects. If any endpoints are missing, feel free to create a pull request (PR) to add the required endpoints.
You can install the package via composer:
composer require isapp/laravel-agile-crm
You will most likely need to edit the extensive configuration, so you can publish the config file with:
php artisan vendor:publish --tag="agile-crm"
This package is based on documentation of Agile CRM REST API
Each AgileCRM entity is implemented as a lightweight DTO (Data Transfer Object), providing straightforward access to the underlying data. This design minimizes the need for redundant validation processes and ensures that data handling remains simple and efficient without adding unnecessary complexity.
First You need to add environment variables Authentication credentials:
AGILE_CRM_DOMAIN=domain
AGILE_CRM_EMAIL=[email protected]
AGILE_CRM_API_KEY=855*********************88
To work with multiple domains in parallel, simply add a new domain to the config/agile-crm.php file.
return [
...
'domains' => [
...
'custom_domain' => [
'domain' => env('AGILE_CRM_DOMAIN'),
'email' => env('AGILE_CRM_EMAIL'),
'api_key' => env('AGILE_CRM_API_KEY'),
],
],
];
$contact = AgileCrm::contacts()->index()
$contact = AgileCrm::domain('custom_domain')->contacts()->index()
$contact = AgileCrm::contacts()->index()
Result will Collection of ContactDto
use Isapp\AgileCrm\Dto\ContactDto;
use Isapp\AgileCrm\Dto\ContactPropertyDto;
use Isapp\AgileCrm\Enums\ContactSystemPropertyName;
...
$properties = [];
$properties[] = new ContactPropertyDto(
name: ContactSystemPropertyName::FIRST_NAME,
value: 'John',
);
$properties[] = new ContactPropertyDto(
name: ContactSystemPropertyName::LAST_NAME,
value: 'Doe',
);
$properties[] = new ContactPropertyDto(
name: ContactSystemPropertyName::EMAIL,
value: '[email protected]',
);
$dto = new ContactDto(properties: $properties);
$contactDto = AgileCrm::contacts()->create($dto);
...
Result will ContactDto
Contributions are welcome! If you have suggestions for improvements, new features, or find any issues, feel free to submit a pull request or open an issue in this repository.
Thank you for helping make this package better for the community!
This project is open-sourced software licensed under the MIT License.
You are free to use, modify, and distribute it in your projects, as long as you comply with the terms of the license.
Maintained by ISAPP and ISAP OÜ.
Check out our software development services at isap.me.