承接 whilesmart/eloquent-outreach 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

whilesmart/eloquent-outreach

Composer 安装命令:

composer require whilesmart/eloquent-outreach

包简介

Host-agnostic user outreach for Laravel: compose messages with a call to action, target audiences, and track per-recipient deliveries across pluggable channels.

README 文档

README

Host-agnostic user outreach for Laravel. Compose a message with a call to action, target an audience, and track a per-recipient delivery, all over channels your app implements. The package owns the workflow; your app owns how recipients are found, addressed, personalized, and sent.

Installation

composer require whilesmart/eloquent-outreach
php artisan vendor:publish --tag=outreach-migrations
php artisan migrate

Concepts

  • Outreach — one composed message: subject, body, CTA (cta_label + cta_url), channel, audience criteria, status, optional scheduled_at, and rolled-up stats. Optional polymorphic owner (sender) and campaign (a campaign "has many" outreaches).
  • Delivery — one row per recipient, with status and timestamps. This is what later per-recipient actions (resend, view, mark) hang off.

What the host implements

use Whilesmart\Outreach\Contracts\AudienceResolver;  // criteria -> recipient models
use Whilesmart\Outreach\Contracts\MessageRenderer;   // outreach + recipient -> RenderedMessage
use Whilesmart\Outreach\Contracts\OutreachChannel;   // deliver a RenderedMessage

Bind your implementations in a service provider:

$this->app->bind(AudienceResolver::class, MyAudienceResolver::class);
$this->app->bind(OutreachChannel::class, MyEmailChannel::class);
// MessageRenderer defaults to attribute token replacement ({{first_name}});
// bind your own for richer templating.

Safe defaults ship out of the box: the audience resolves to nobody and the channel sends nowhere until you bind real ones.

Sending

use Whilesmart\Outreach\Models\Outreach;
use Whilesmart\Outreach\Services\OutreachDispatcher;

$outreach = Outreach::create([
    'channel' => 'email',
    'subject' => 'Hi {{first_name}}',
    'body' => 'We added something you will like.',
    'cta_label' => 'Open Trakli',
    'cta_url' => 'https://trakli.app/dashboard',
    'audience' => ['type' => 'inactive', 'days' => 30],
]);

app(OutreachDispatcher::class)->dispatch($outreach);

The dispatcher resolves the audience, creates a Delivery per recipient, renders and sends each through the bound channel, rolls the results onto the outreach, and emits OutreachDispatched, DeliverySucceeded, and DeliveryFailed for the host to bridge.

Campaigns

An outreach can belong to a campaign via the optional campaign morph, so a campaign (in your app or another package) can own many outreaches without this package depending on it.

License

MIT. WhileSmart LTD.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固