combindma / laravel-sendinblue
此包已废弃,不再维护。未建议替代包。
使用Sendinblue在Laravel中管理时事通讯
1.1.0
2023-03-18 14:59 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.4
- illuminate/contracts: ^9.0|^10.0
- sendinblue/api-v3-sdk: ^8.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0|^8.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.6
README
使用Sendinblue在Laravel中管理时事通讯
安装
您可以通过composer安装此包
composer require combindma/laravel-sendinblue
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="sendinblue-config"
这是发布配置文件的内容
return [ /* * Enable or disable Sendinblue. Useful for local development when running tests. */ 'api_enabled' => env('SENDINBLUE_ENABLED', false), /* * The API key of a Sendinblue account. */ 'apiKey' => env('SENDINBLUE_APIKEY'), /* * The default Ids of the lists to add the contact to when no listIds has been specified in a method. */ 'defaultListIds' => [ 2, ] ];
使用方法
订阅电子邮件地址可以这样做
Sendinblue::subscribe('email@email.com');
您可以将一些合并变量作为第二个参数传递
Sendinblue::subscribe('email@email.com', ['FNAME'=>'Rince', 'LNAME'=>'Wind'];
您可以使用第三个参数将某人订阅到特定的列表ID
Sendinblue::subscribe('email@email.com', ['FNAME'=>'Rince', 'LNAME'=>'Wind'], [2]);
取消订阅电子邮件地址可以这样做
Sendinblue::unsubscribe('email@email.com');
测试
composer test
贡献
请参阅CONTRIBUTING以获取详细信息。
安全漏洞
请查看我们的安全策略以了解如何报告安全漏洞。
鸣谢
许可
MIT许可(MIT)。请参阅许可文件以获取更多信息。