samedi 27 octobre 2018

User profile picture overtaken by default picture (laravel)

I wanted to add a default profile picture to new registered users. Therefore I add this code below:

<a href="#change_photo" data-toggle="modal">
@if (file_exists(public_path().'/images/'.$user->photo))
    <img src="" class="img-circle" alt="Add picture">
@else
    <img src="" class="img-circle" alt="Add picture">
@endif

It worked well, however all users' customized profile pictures are now displaying the default picture.

Laravel version 5.2.45 & PHP version 7.2. Thank you



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2CFfxAp
via IFTTT

Aucun commentaire:

Enregistrer un commentaire