Update favicon-extension.blade.php
This commit is contained in:
parent
d169987b72
commit
3609d1477a
|
@ -1,14 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function localIcon($id) {
|
if (!function_exists('localIcon')) {
|
||||||
|
function localIcon($id)
|
||||||
|
{
|
||||||
$directory = base_path("assets/favicon/icons");
|
$directory = base_path("assets/favicon/icons");
|
||||||
$files = scandir($directory);
|
$files = scandir($directory);
|
||||||
$pathinfo = "error.error";
|
$pathinfo = "error.error";
|
||||||
foreach($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (strpos($file, $id.'.') !== false) {
|
if (strpos($file, $id . '.') !== false) {
|
||||||
$pathinfo = $id. "." . pathinfo($file, PATHINFO_EXTENSION);
|
$pathinfo = $id . "." . pathinfo($file, PATHINFO_EXTENSION);
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
return $pathinfo;
|
return $pathinfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue