I currently have a fully working logo function, which adds a logo to the associated user, and then displays it. The only problem, is that even if a user hasn't uploaded a logo, it tries to display a "missing" one (which doesn't exist).
I would like to either:
- Check to see if a logo exists, if it does, display it.
- Have a default placeholder image (I have holder.js installed). I cannot find any documentation on adding default placeholders for missing logos though.
I've tried things like:
@if($clinic->logo->url() !== null)
<img src="<?= $clinic->logo->url('medium') ?>" alt="<?= $clinic->name ?>"
class="img-rounded col-md-12" style="padding-bottom: 20px;">
@endif
But, the $clinic->logo->url()
isn't null, in that sense, because it outputs - "/logos/original/missing.png"
.
Any help would be hugely appreciated
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire