Files
boursecu_server/app/Services/Automation/AutomationEvents.php
T
2026-08-23 14:16:00 +03:30

25 lines
602 B
PHP

<?php
namespace App\Services\Automation;
use Illuminate\Support\Facades\Log;
class AutomationEvents
{
public static function fire(string $event, int $customerId): void
{
if ($customerId <= 0 || $event === '') {
return;
}
try {
app(AutomationEngine::class)->onCustomerEvent($event, $customerId);
} catch (\Throwable $e) {
Log::warning('Automation event failed', [
'event' => $event,
'customer_id' => $customerId,
'error' => $e->getMessage(),
]);
}
}
}