michabbb on Nostr: ⚠️ Beware of Sorting Pitfalls in #Laravel Collections! ⚠️ Ever stumbled upon ...
⚠️ Beware of Sorting Pitfalls in #Laravel Collections! ⚠️
Ever stumbled upon unexpected sorting results with Laravel's `sortBy` when using multiple criteria? Here's why it can fail—and why it's dangerous! 🐛
Let me explain why: 🧵 👇 #php #WTF
Published at
2025-05-21 01:26:27 UTCEvent JSON
{
"id": "32902dd5e7f0a20f4f88fb3468a8cb494af2520586a4a80cc5e637b06d229b6f",
"pubkey": "129f83898c7008d335771fe681ecf979e7767ad958c552ff85de962ba2f775be",
"created_at": 1747790787,
"kind": 1,
"tags": [
[
"t",
"laravel"
],
[
"t",
"php"
],
[
"t",
"wtf"
],
[
"imeta",
"url https://social-cdn.vivaldi.net/system/media_attachments/files/114/543/217/034/906/272/original/cc4d4eff1d24c403.png",
"m image/png",
"dim 1024x1024",
"blurhash UBFXFzDQE3u3_2D*I;-:Gs58WB}?AHNH-TS#"
],
[
"proxy",
"https://social.vivaldi.net/users/michabbb/statuses/114543217052224911",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.mostr.pub"
]
],
"content": "⚠️ Beware of Sorting Pitfalls in #Laravel Collections! ⚠️\n\nEver stumbled upon unexpected sorting results with Laravel's `sortBy` when using multiple criteria? Here's why it can fail—and why it's dangerous! 🐛\n\nLet me explain why: 🧵 👇 #php #WTF\n\nhttps://social-cdn.vivaldi.net/system/media_attachments/files/114/543/217/034/906/272/original/cc4d4eff1d24c403.png",
"sig": "2ded50a5a6e8ea1e8449dc11a1525ecbc012b702c50123583e2ab9f8db2f2f9a08ae4ed7d26405a59ce4d69ae92d4b8b7e9c07277bff2c34014ae7dc73ecd46a"
}