In your user model you could do the following.
public function getProfilePic() {
$file = $this->profile_image->file;
if ( empty($file) ) {
// No file exists.
return asset('empty_profile.png');
}
//
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community