@zoul I think you define it wrong way. Use just 1 deleting
public static function boot() {
parent::boot();
static::deleting(function($user) {
//user_meta
if($user->user_meta->photo ?? false) {
$image = Str::after($user->user_meta->photo, 'images/');
File::delete('images/'.$image);
$user->user_meta()->delete(); // your don't have a $meta variable
}
//tribes
$user->tribes->each(function($tribe) {
$image = Str::after($tribe->photo, 'images/');
File::delete('images/'.$image);
$tribe->delete();
}
//posts
$user->posts->each(function($post) {
$image = Str::after($post->photo, 'images/');
File::delete('images/'.$image);
$post->delete();
}
});
}