vendredi 13 mars 2020

How to check if a file exists in a url in laravel

@if (file_exists(env('BASE_URL_MASTER').$p->main_image))

<img class="primary-img" src="" alt="single-product" height="200px" width="400px">

@else
<img class="primary-img" src="" alt="single-product" height="200px" width="400px">
endif

I want to check whether given URL has Image if image is available then @if condition should work. but its not working



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire