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