08 2024
This commit is contained in:
parent
c1c613a4b9
commit
881fc84207
384 changed files with 50679 additions and 990 deletions
|
|
@ -4,6 +4,16 @@ namespace App\Services;
|
|||
class Util
|
||||
{
|
||||
|
||||
public static function isTestSystem($dev = false){
|
||||
if(\Config::get('app.domain_tld') === 'test'){
|
||||
if($dev && config('app.debug') !== true){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function formatDate(){
|
||||
if(\App::getLocale() == "en"){
|
||||
return 'yyyy-mm-dd';
|
||||
|
|
@ -65,6 +75,7 @@ class Util
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function _implodeLines($value, $glue=PHP_EOL){
|
||||
if(is_array($value)){
|
||||
return implode($glue, $value);
|
||||
|
|
@ -235,6 +246,19 @@ class Util
|
|||
return $html;
|
||||
}
|
||||
|
||||
public static function prepareCollapseValues(){
|
||||
if(\Session::has('collapse_shows')){
|
||||
$collapse_shows = \Session::get('collapse_shows');
|
||||
if(strpos($collapse_shows, ',')){
|
||||
$collapse_shows = explode(',', $collapse_shows);
|
||||
return json_encode($collapse_shows);
|
||||
}
|
||||
return json_encode([0 => $collapse_shows]);
|
||||
}
|
||||
|
||||
return json_encode([0 => 'non']);
|
||||
}
|
||||
|
||||
public static function convertArrayWindowsCharset($values){
|
||||
foreach ($values as $key=>$string){
|
||||
$values[$key] = self::convertStringWindowsCharset($string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue