title: If more than 1 image file exists in Laravel Model
body: <p>I found out that im unable to use assets in file_exists if i put them in the controller, thats why im using them inside the model. Anyway in my code i need to output 3 different pictures if each of them are available. </p>
  
  <p>This is my current code</p>
  
  <pre><code>if(File::exists( public_path().'/image/hospitals/' .$this-&gt;HospitalID . '.jpg')){
              return asset('/image/hospitals/' .$this-&gt;HospitalID . '.jpg');
          }  else {
              return asset('/image/hospitals/default.jpg');
          }
  </code></pre>
  
  <p>For now this code is only able to output 1 image and default it if the image is not available. My question is, how do I input 3 images? 
  My file names for the 3 images are:</p>
  
  <p>[HospitalID]_1.jpg [HospitalID_2].jpg [HospitalID_3].jpg </p>
  
  <p>for example 
  10_1.jpg 10_2.jpg 10_3.jpg</p>
  
  <p>thanks a ton!</p>