I managed to find the solution.
In case someone else has this issue, the solution is this:
if (File::exists($userImage)) {
unlink($userImage);
Image::where('imageable_type', 'App\User')->where('imageable_id', $user->id)->delete();
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community