id . (string) $account->created_at); $path = "public/m/{$monthHash}/{$userHash}"; break; case 2: $monthHash = substr($mh, 0, 9).'-'.substr($mh, 9, 6); $userHash = $account->profile_id; $random = Str::random(12); $path = "public/m/_v2/{$userHash}/{$monthHash}/{$random}"; break; default: $monthHash = substr($mh, 0, 9).'-'.substr($mh, 9, 6); $userHash = $account->profile_id; $random = Str::random(12); $path = "public/m/_v2/{$userHash}/{$monthHash}/{$random}"; break; } } if($account instanceOf Profile) { $monthHash = substr($mh, 0, 9).'-'.substr($mh, 9, 6); $userHash = $account->id; $random = Str::random(12); $path = "public/m/_v2/{$userHash}/{$monthHash}/{$random}"; } return $path; } }