added automation

This commit is contained in:
2026-08-23 14:16:00 +03:30
parent 0c0b424a69
commit 657c10d1cc
19 changed files with 1372 additions and 0 deletions
@@ -0,0 +1,24 @@
<?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(),
]);
}
}
}