exists && $texture->public) { return; } $likers = $texture ->likers() ->where('user_uid', '!=', $texture->uploader) ->get(); $likers->each(function (User $user) use ($texture) { $user->closet()->detach($texture->tid); if (option('return_score')) { $user->score += (int) option('score_per_closet_item'); $user->save(); } }); if ($texture->exists) { $texture->decrement('likes', $likers->count()); } } }