where('key', 'CORE')->first() ?? Project::query()->orderBy('id')->first(); if ($project === null) { return; } $project->notificationActions()->updateOrCreate( [ 'name' => 'Core Status Webhook', ], [ 'channel' => NotificationChannel::Webhook, 'channel_configuration' => [], 'delivery_url' => 'https://hooks.example.test/kanbangit/core-status', 'enabled' => true, 'event_type' => NotificationEventType::TicketStatusChanged, 'message_template' => null, ], ); $project->notificationActions()->updateOrCreate( [ 'name' => 'Core Status Discord', ], [ 'channel' => NotificationChannel::Discord, 'channel_configuration' => [], 'delivery_url' => 'https://discord.com/api/webhooks/123456/core-status', 'enabled' => false, 'event_type' => NotificationEventType::TicketStatusChanged, 'message_template' => '$ticket_key moved from $status_from to $status_to: $url', ], ); } }