Create Slack application
WHATSSUPPPPPPPP GUYS! ✅ Step 1: Create a Slack Incoming Webhook Go to: https://api.slack.com/apps Create a new app or select an existing one. This part kene manage Go to "Incoming Webhooks" on the left menu. Activate Incoming Webhooks . Click "Add New Webhook to Workspace" and choose the #pg-alert channel or any channel that you want. Copy the generated Webhook URL (e.g., https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXX ). ✅ Step 2: Create a Helper or Function in CodeIgniter You can place this in a helper ( application/helpers/slack_helper.php ) or directly in a model/controller. // application/helpers/slack_helper.php if (!function_exists('send_slack_alert')) { function send_slack_alert($message) { $webhook_url = 'https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXX'; // replace with your URL $payload = json_encode([ ...