Updates to 03-2025

This commit is contained in:
Kevin Adametz 2025-04-01 10:39:21 +02:00
parent 6167273a48
commit 9b54eb0512
348 changed files with 34535 additions and 5774 deletions

View file

@ -4,6 +4,7 @@ namespace App\Services;
use App\Models\UserHistory;
use Illuminate\Support\Str;
use Yard;
use Request;
class Util
{
@ -170,7 +171,17 @@ class Util
return false;
}
public static function getMyMivitaUrl($protocol = true){
public static function isPromotionUrl($debug = false){
if($debug && config('app.debug')){
return false;
}
if(Request::getHost() === config('app.promo_domain')){
return true;
}
return false;
}
public static function getMyUrl($protocol = true){
$pro = $protocol ? config('app.protocol') : "";
return $pro.config('app.pre_url_crm').config('app.domain').config('app.tld_care');
}
@ -221,7 +232,7 @@ class Util
return url($uri);
}
public static function substr_ellipsis($str, $len=100, $clean, $ell="..."){
public static function substr_ellipsis($str, $len=100, $clean=false, $ell="..."){
if($clean){
$str = strip_tags($str);
}
@ -257,11 +268,7 @@ class Util
$clean = (strlen($clean) > 20) ? substr($clean,-20) : $clean;
}
return ($force_lowercase) ?
(function_exists('mb_strtolower')) ?
mb_strtolower($clean, 'UTF-8') :
strtolower($clean) :
$clean;
return ($force_lowercase) ? ((function_exists('mb_strtolower')) ? mb_strtolower($clean, 'UTF-8') : strtolower($clean)) : $clean;
}
}