Add (ai tool submission)
This commit is contained in:
@@ -10,9 +10,10 @@ class Cached
|
||||
public static function tools_count()
|
||||
{
|
||||
$seconds_to_remember = 599;
|
||||
|
||||
// Retrieve the count from the cache or count and store it if not present
|
||||
return Cache::remember('tools_count_' . $seconds_to_remember, $seconds_to_remember, function () {
|
||||
return AiTool::where('status','live')->count();
|
||||
return Cache::remember('tools_count_'.$seconds_to_remember, $seconds_to_remember, function () {
|
||||
return AiTool::where('status', 'live')->count();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
require 'geo_helper.php';
|
||||
require 'proxy_helper.php';
|
||||
require 'route_helper.php';
|
||||
require 'platform_helper.php';
|
||||
|
||||
21
app/Helpers/Global/platform_helper.php
Normal file
21
app/Helpers/Global/platform_helper.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
if (! function_exists('get_notification_channel')) {
|
||||
|
||||
function get_notification_channel()
|
||||
{
|
||||
return 'telegram';
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('get_notification_user_ids')) {
|
||||
|
||||
function get_notification_user_ids()
|
||||
{
|
||||
return [
|
||||
|
||||
'629991336', // me
|
||||
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,8 @@
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
if (! function_exists('count_words')) {
|
||||
function count_words($string) {
|
||||
function count_words($string)
|
||||
{
|
||||
// Remove punctuation and line breaks
|
||||
$cleanString = preg_replace('/[\p{P}\s]/u', ' ', $string);
|
||||
|
||||
@@ -16,7 +17,6 @@ function count_words($string) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! function_exists('dmy')) {
|
||||
function dmy(Carbon $carbon)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user