Updates to 03-2025
This commit is contained in:
parent
6167273a48
commit
9b54eb0512
348 changed files with 34535 additions and 5774 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue