I want to display default profile image if user do not have profile image
PHP Snippet 1:
if(!empty($path)){
$path='<img src="/image/'.$image.'"/>';
} else {
$path='<img src="/image/default.jpg"/>';
}
PHP Snippet 2:
<div>
@if($user)
<img src="{{ $user['user_avatar'] ? $user['user_avatar']:'default_profile_image' }}" alt="user image">
@else
<img src="default_profile_image" alt="user image">
@endif
</div>