@extends('layouts.sidebar') @section('content') @php function findFileSite($name){ $directory = base_path('/littlelink/images/'); $files = scandir($directory); $pathinfo = "error.error"; foreach($files as $file) { if (strpos($file, $name.'.') !== false) { $pathinfo = $name. "." . pathinfo($file, PATHINFO_EXTENSION); }} return $pathinfo; } @endphp Site @csrf Site logo@if(file_exists(base_path("littlelink/images/").findFileSite('avatar')))@endif Favicon@if(file_exists(base_path("littlelink/images/").findFileSite('favicon')))@endif Home message {{ $home_message }} Submit @endsection