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="{{ asset('images/'.$user->photo) }}" class="img-circle" alt="Add picture">
@else
<img src="{{ asset('images/profile_picture.jpg') }}" 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