stephenjude/laravel-sendportal
最新稳定版本:1.0.2
Composer 安装命令:
composer require stephenjude/laravel-sendportal
包简介
A Laravel Package to work with the SendPortal API
README 文档
README
The unofficial Laravel Package to work with the SendPortal APIs.
Installation
You can install the package via composer:
composer require stephenjude/laravel-sendportal
Set up
To start using this package, you need to add environment variables for:
SENDPORTAL_URL- The url of your Sendportal account like this — https://sendportal.io/api/v1SENDPORTAL_TOKEN- You can generate this from your SendPortal account.
The package will pick these up in its configuration and use these when it resolves an instance of the Client.
Usage
This package can be used by using the SendPortal facade or by injecting the SendPortal\Laravel\Http\Client into a method to instantiate the client:
use SendPortal\Laravel\Contracts\ClientContract; use SendPortal\Laravel\Facades\SendStack; /** * Without a Facade */ $client = app()->make( abstract: ClientContract::class, ); $client->subscribers()->all(); /** * Using the Facade */ SendPortal::subscribers()->all();
Getting a list of Subscribers
use SendPortal\Laravel\Facades\SendPortal; SendPortal::subscribers()->all();
Getting a single Subscriber
use SendPortal\Laravel\Facades\SendPortal; SendPortal::subscribers()->get( subscriber: 1, );
Creating a new Subscriber
use SendPortal\Laravel\Facades\SendPortal; use SendPortal\Laravel\Http\Requests\SubscriberRequest; SendPortal::subscribers()->create( request: new SubscriberRequest( email: 'contact@sendportal.local', // Required firstName: 'Send', // Optional lastName: 'Portal', // Optional tags: [ 1, 2, ], // Optional optOut: false, // Optional ), );
Update a Subscriber
use SendPortal\Laravel\Facades\SendPortal; use SendPortal\Laravel\Http\Requests\SubscriberRequest; SendPortal::subscribers()->update( id: 1, request: new SubscriberRequest( email: 'contact@sendportal.local', // Required firstName: 'Send', // Optional lastName: 'Portal', // Optional tags: [ 1, 2, ], // Optional optOut: false, // Optional ), );
Deleting a Subscriber
use SendPortal\Laravel\Facades\SendPortal; SendPortal::subscribers()->delete( subscriberId: 1, );
Attaching a Tag to a Subscriber
use SendPortal\Laravel\Facades\SendPortal; SendPortal::subscribers()->attachTag( subscriberId: 1, tagId: 1, );
Removing a Tag from a Subscriber
use SendPortal\Laravel\Facades\SendPortal; SendPortal::subscribers()->removeTag( subscriberId: 1, tagIds: [1, 2], );
Checking if an email address is an Active Subscriber
use SendPortal\Laravel\Facades\SendPortal; SendPortal::isActiveSubscriber( subscriberId: 1, );
Getting all Tags
use SendPortal\Laravel\Facades\SendPortal; SendPortal::tags()->all();
Creating a new Tag
use SendPortal\Laravel\Facades\SendPortal; use SendPortal\Laravel\Http\Requests\TagRequest; SendPortal::tags()->create( request: new TagRequest( name: 'Test', // Required subscribers: [1], // Optional ), );
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
stephenjude/laravel-sendportal 适用场景与选型建议
stephenjude/laravel-sendportal 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.65k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2022 年 08 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「laravel」 「sendportal」 「laravel-sendportal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 stephenjude/laravel-sendportal 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stephenjude/laravel-sendportal 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 stephenjude/laravel-sendportal 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
API Client for SendPortal.IO
Alfabank REST API integration
Zero-dependency raw PHP DNS resolver, domain-ownership verification, and intoDNS/MxToolbox-style diagnostics. Queries authoritative nameservers directly over sockets — never trusts the recursive cache for ownership checks.
Laravel package for Accurate Online API integration.
A lightweight plain-PHP framework for database-backed CRUD APIs.
统计信息
- 总下载量: 2.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-23