title: How to check my targeted file's extention from the public directory according to file name?
body: <p>I have an employee folder in the public directory. A picture can be uploaded there with different extensions. The extension can be either small or capital letters. </p>
  
  <p>example :
  A user can upload a file such as listed below:</p>
  
  <pre><code> 12345.JPG Or 12345.jpg Or 12345.PNG Or 12345.png
  </code></pre>
  
  <p>When I am going to show/view this uploaded image file according to an employee number, first I need to know the uploaded file's correct extension from the public directory.</p>
  
  <p>I have tried to show using below one only for one extension but not for all.</p>
  
  <pre><code>&lt;img class="profile-user-img img-fluid img-circle"
      src="{{ (file_exists(public_path('/hrm/employee/'.$employee-&gt;employee_no.'.JPG'))) ? asset('/hrm/employee/'.$employee-&gt;employee_no.'.JPG') : asset('/hrm/employee/'.$employee-&gt;employee_no.'.jpg') }}"
      alt="User profile picture"&gt;
  </code></pre>
  
  <p>Can someone please tell me how can I show the image name from the directory without knowing the uploaded file's extension for a specific employee number?</p>