LinkStack/resources/views/components/favicon-extension.blade.php

19 lines
438 B
PHP
Raw Normal View History

2022-11-28 19:44:02 +01:00
<?php
2023-11-23 15:18:51 +01:00
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;
}
2022-11-28 19:44:02 +01:00
}
?>