Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
<?php
declare(strict_types=1);
namespace App\Jobs\PostHog;
use App\Enums\PostHog\TrialEvent;
use App\Models\Account;
use App\Support\StripeSubscriptionConversion;
use Illuminate\Support\Carbon;
class TrackTrialStarted extends AbstractTrackStripeEvent
{
protected function shouldCapture(Account $account): bool
{
return filled($account->plan);
}
protected function event(): string
{
return TrialEvent::Started->value;
}
/**
* @return array<string, mixed>
*/
protected function properties(Account $account): array
{
$properties = StripeSubscriptionConversion::baseProperties($account, $this->payload);
$trialEnd = data_get($this->payload, 'data.object.trial_end');
if (is_int($trialEnd)) {
$properties['trial_ends_at'] = Carbon::createFromTimestamp($trialEnd)->toIso8601String();
}
return $properties;
}
}