yehudafh / active-trail
active-trail.
v1.1.1
2020-11-23 16:14 UTC
Requires
- php: >=7.0
- guzzlehttp/guzzle: ~7.0
Suggests
- guzzlehttp/guzzle: Required to use the Slack transport (~7.0)
README
安装
Laravel Activetrail 需要 Laravel 5.5 或更高版本,以及 PHP 7.0+。
您可以使用 Composer 将 Laravel Activetrail 安装到您的 Laravel 项目中
composer require yehudafh/active-trail
配置
安装 Laravel Activetrail 后,使用 vendor:publish
Artisan 命令发布其配置
php artisan vendor:publish --provider="Yehudafh\ActiveTrail\ActiveTrailServiceProvider"
基本用法
在 activetrail 中添加或更新用户
ActiveTrail::email('test@example.com') # Optional -> // ->sms('+972000000000') // ->status() // ->fullname('test test') #or ->firstName()->lastName() // ->street() // ->zipCode() // ->city() // ->phone1() // ->phone2() // ->fax() // ->birthday() // ->anniversary() // ->isDoNotMail() // ->isDeleted() ->update();
更新用户组
ActiveTrail::email('test@example.com') ->addToGroup(1234); ActiveTrail::email('test@example.com') ->addToGroups([1234, 45678]); ActiveTrail::email('test@example.com') ->removeFromGroups([1234, 45678]);
更新用户电子邮件
ActiveTrail::updateEmail('test@example.com', 'new@example.com');
已退订用户
ActiveTrail::email('test@example.com')->unsubscribed();
更多详细信息请参阅ActiveTrail 文档。
贡献
感谢您考虑为 Activetrail 贡献。
许可证
Laravel Activetrail 是开源软件,许可协议为MIT 许可证。