keepcloud/laravel-mautic-api
Composer 安装命令:
composer require keepcloud/laravel-mautic-api
包简介
Free and Open Source Marketing Automation API
README 文档
README
Free and Open Source Marketing Automation API
Requirements
- PHP >7.2.5
- cURL support
Mautic Setup
The API must be enabled in Mautic. Within Mautic, go to the Configuration page (located in the Settings menu) and under API Settings enable Mautic's API. You can also choose which OAuth2 protocol to use here. After saving the configuration, go to the API Credentials page (located in the Settings menu) and create a new client. Enter the callback/redirect URI that the request will be sent from. Click Apply then copy the Client ID and Client Secret to the application that will be using the API.
Installation
First, you'll need to require the package with Composer:
composer require keepcloud/laravel-mautic-api
Aftwards, run composer update from your command line.
Then, update config/app.php by adding an entry for the service provider.
'providers' => [ // ... 'Keepcloud\Mautic\MauticServiceProvider', ],
Then, register class alias by adding an entry in aliases section
'aliases' => [ //..... 'Mautic' => 'Keepcloud\Mautic\Facades\Mautic', ],
Finally, from the command line run php artisan vendor:publish to publish the default configuration file.
This will publish a configuration file name mautic.php ,consumer migration and consumer model.
Run php artisan migrate migration command to create consumer table in your database.
Configuration
You need to add your client id, client secret and callback url in mautic.php file that is found in your applications config directory.
Authorization
This Library only support OAuth2 Authorization you must need to create a OAuth2 client in order to use api.
Registering Application
In order to register you application with mautic ping this url this is one time registration.
http://your-app/mautic/application/register
Usage
Add Mautic Facade in your controller.
use Mautic;
Send a request to mautic ( Example )
Create a new contact in mautic.
$params = array( 'firstname' => 'Edison', 'lastname'=> 'Costa', 'email' => 'edison@keepcloud.io' ); Mautic::request('POST','contacts/new',$params);
Get List of all contacts
Mautic::request('GET','contacts');
Get a unique contact
Mautic::request('GET','contacts/1'); //where 1 is unique id for a contact.
Delete a contact
Mautic::request('Delete','contacts/1/delete');
And many more endpoints support by mautic.
List of Endpoints supported by Mautic.
Contacts
[
"contacts",
"contacts/{id}",
"contacts/list/fields",
"contacts/list/owners",
"contacts/new",
"contacts/{id}/edit",
"contacts/{id}/delete",
"contacts/{id}/notes",
"contacts/{id}/segments",
"contacts/{id}/campaigns"
]
Assets
[
"assets",
"assets/{id}"
]
Campaigns
[
"campaigns",
"campaigns/{id}",
"campaigns/contact/{id}/add/{leadId}",
"campaigns/contact/{id}/remove/{leadId}"
]
Data
[
"data",
"data/{type}",
]
Emails
[
"emails",
"emails/{id}",
"emails/{id}/send",
"emails/{id}/send/lead/{leadId}"
]
Forms
[
"forms",
"forms/{id}"
]
Pages
[
"pages",
"pages/{id}"
]
Points
[
"points",
"points/{id}",
"points/triggers",
"points/triggers/{id}"
]
Reports
[
"reports",
"reports/{id}"
]
Segments
[
"segments",
"segments/contact/{id}/add/{leadId}",
"segments/contact/{id}/remove/{leadId}"
]
Users
[
"roles",
"roles/{id}",
"users",
"users/{id}",
"users/list/roles",
"users/self",
"users/{id}/permissioncheck",
]
Please refer to Documentation. for all customizable parameters.
keepcloud/laravel-mautic-api 适用场景与选型建议
keepcloud/laravel-mautic-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 71 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 06 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「email」 「sync」 「laravel」 「automation」 「marketing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 keepcloud/laravel-mautic-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 keepcloud/laravel-mautic-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 keepcloud/laravel-mautic-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A sleek PHP wrapper around rclone with Laravel-style fluent API syntax
A PSR-7 compatible library for making CRUD API endpoints
Sync content to other sites on element save.
Extensible library for building notifications and sending them via different delivery channels.
Email+ extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.
Production-ready third-party integrations for Laravel. Credential management, API request logging, rate limiting, sync scheduling, OAuth2, and health monitoring.
统计信息
- 总下载量: 71
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-23