Tree Travel Guide
This commit is contained in:
parent
a1ca534f55
commit
1f340e96fa
78 changed files with 4133 additions and 1027 deletions
|
|
@ -15,4 +15,64 @@ if (! function_exists('make_v2_url')) {
|
|||
$path = trim($path, "/");
|
||||
return config('app.url_v2')."/".$path;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! function_exists('array_to_json')) {
|
||||
function array_to_json($value)
|
||||
{
|
||||
return htmlspecialchars(json_encode($value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! function_exists('last_array_element')) {
|
||||
function last_array_element($value)
|
||||
{
|
||||
$e = explode("/", $value);
|
||||
if(is_array($e)){
|
||||
return end($e);
|
||||
}
|
||||
return $e;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('pre_slug')) {
|
||||
function pre_slug($value)
|
||||
{
|
||||
return strtr($value, ["Ä" => "ae", "Ö" => "oe", "Ü" => "ue", "ä" => "ae", "ö" => "oe", "ü" => "ue", "ß"=>"ss"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! function_exists('get_active_badge')) {
|
||||
function get_active_badge($active)
|
||||
{
|
||||
return $active ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('get_switcher_input')) {
|
||||
function get_switcher_input($active = false, $name = "", $label = "")
|
||||
{
|
||||
return '<label class="switcher">
|
||||
<input type="checkbox" name="'.$name.'" class="switcher-input" '.($active ? 'checked="checked"' : '').'>
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes"></span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">'.$label.'</span>
|
||||
</label>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('get_file_last_time')) {
|
||||
function get_file_last_time($value)
|
||||
{
|
||||
if (file_exists($value)) {
|
||||
return filemtime($value);
|
||||
}
|
||||
return date("Ymd-i", time());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue