Files
futurewalker/app/Helpers/Global/platform_helper.php

50 lines
1.2 KiB
PHP

<?php
if (! function_exists('get_slack_channel_by_env')) {
function get_slack_channel_by_env($slack_channel = 'slack')
{
if (app()->environment() == 'local') {
return config("platform.notifications.{$slack_channel}.development_channel");
} else {
return config("platform.notifications.{$slack_channel}.production_channel");
}
}
}
if (! function_exists('get_exponential_posts_gen_by_day')) {
// Function to calculate the value for a given day
function get_exponential_posts_gen_by_day($day, $period_days = 45)
{
$min_value = 4;
$max_value = 150;
$growthRate = log($max_value / $min_value) / $period_days; // Calculate the growth rate
$value = round($min_value * exp($growthRate * $day));
if ($value > $max_value) {
return $max_value;
}
return $value;
}
}
if (! function_exists('get_notification_channel')) {
function get_notification_channel()
{
return 'telegram';
}
}
if (! function_exists('get_notification_user_id')) {
function get_notification_user_id()
{
return '629991336';
}
}