Son gönderiler
1. sayfa / 60 · 713 gönderi
Yayınlandı 26 Mar
🔥 PHP 8.5 just shipped and the pipe operator |> changes how you write Laravel code forever. Before PHP 8.5, chaining operations looked like this: $result = strtoupper(trim(str_replace('-', ' ', $slug))); With the new pipe operator in PHP 8.5: $result = $slug |> trim(...) |> (fn($s) => str_replace('-', ' ', $s)) |> strtoupper(...); Clean. Readable. Left-to-right execution — exactly how your brain reads it. Other PHP 8.5 wins worth knowing: ✅ array_first() and array_last() — finally native ✅ #[\NoDiscard] attribute — catches silent bugs at runtime ✅ Built-in URI/URL extension — no more manual string parsing ✅ OPcache now always compiled in by default ✅ clone with property overrides — immutable workflows just got clean PHP is not dying. PHP is evolving — and 8.5 is proof. Are you still on 8.2 or lower? Time to plan that upgrade. Source: linkedin
Yayınlandı 13 Eki
Laravelda bir nechta serverlar bilan ishlaganda envlarni avto tanlash uchun kod (local development uchun). Ushbu kod app/bootstrap papkaga tashlanadi va gitignorega joylanadi (shunda faqat local development uchun ishlaydi) bootstrap/app.php faylda appdan instance olingan joyidan keyin ushbu kod require qilib qoyiladi: $app = new Illuminate\Foundation\Application( $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); if(file_exists(__DIR__ . '/development.php')) { require __DIR__ . '/development.php'; } Va ushbu kod sizga console yoki httpdan kelgan zaprosga qarab env load qilib beradi. Masalan zapros test.example.test domaindan kelsa .env.test faylni load qiladi, dev.example.test dan kelsa .env.dev ni load qiladi Consoleda ham shunaqa php artisan dev command - .env.dev load boladi php artisan test command - .env.test load boladi P.s: kod herdga moslandi boshqa applarda ham moslasa boladi domainnni togirlab
Yayınlandı 6 Eki
💡 Laravel Tip: Use Number::abbreviate() for Human-Friendly Numbers. When displaying large numbers to users, readability matters. Instead of showing long digits like 1523000, Laravel now gives you a clean way to abbreviate them. Source: linkedin
Yayınlandı 6 Eki
#clean_code
Hashtags
Yayınlandı 30 Eyl
Stop writing with() and whereHas() separately! Laravel's withWhereHas() does both in one line: ✅ Filters relationships ✅ Eager loads filtered data ✅ Reduces code duplication Perfect for when you need to filter records based on their relationships while loading the related data. One method, cleaner code! Source: linkedin
Yayınlandı 23 Eyl
#meme
Hashtags
Yayınlandı 29 Tem
#tech_debt
Hashtags
Yayınlandı 28 Tem
Laravelda morph relationni type boyicha enumga cast qilgan holatda whereRelation, whereHas orqali filter qilishda chiqadigan muammo uchun yechim: AppServiceProviderga ushbu macro qoshiladi Relation::macro('withoutEnumCasting', function ($casts) { if ($this instanceof MorphTo) { $this->getQuery()->getModel()->mergeCasts($casts); } return $this; }); Relationda shu macro function uchun bizda muammo berayotgan enumca cast qilingan columnlar qayta cast qilinadI: public function order(): MorphTo { return $this->morphTo(__FUNCTION__, 'order_type', 'order_id') ->withoutEnumCasting([ 'order_type' => 'string' ]) ->withTrashed(); }
Yayınlandı 24 Haz
Assalom alaykum!!! UzGeeksʼda PHP kuni! 📌 28-iyun, shanba kuni Toshkent shahri Raqamli texnologiyalar vazirligi binosida "UzGeeks June2025 PHP Day Meetup" boʻlib oʻtadi. ⭐️MeetUpʼda quyidagi spikerlar ishtirok etadi: 1️⃣“PHPda pul bilan ishlash” - Azizbek Ochilov (Software engineer @ Yandex); 2️⃣“Yii2 Queue” - Ismoil Salikhov (Co-Founder @ CTO); 3️⃣“Ratchet - PHP orqali real-time ilovalar” - Olimjon G'ofurov (Software engineer @ NEW LINE SOLUTIONS); 🔄 Meetup odatiy ravishda bepul boʻlib, soat 14:00 da boshlanadi, unda qatnashish uchun UzGeeks.uz saytida roʻyxatdan oʻtish kerak. 📍Manzil: Toshkent shahar, Mirzo Ulugʻbek tumani, Muminov koʻchasi, 4A (Raqamli texnologiyalar vazirligi binosida) 🎙Hamkorlar: ➡️Oʻzbekiston Respublikasi Raqamli texnologiyalar vazirligi; ➡️Raqamli ta'limni rivojlantirish markazi; ➡️Thinkland. Sayt | Guruh | Kanal |Facebook | 💫 Donate
Yayınlandı 4 Haz
Yayınlandı 19 May
Глобализируйте ограничения параметров маршрутов
Yayınlandı 19 May
Assalom alaykum!!! UzGeeksʼda DevOps kuni! 📌 31-may, shanba kuni TATU binosida "UzGeeks May2025 DevOps Day Meetup" boʻlib oʻtadi. ⭐️Meetupʼda quyidagi spikerlar ishtirok etadi: 1️⃣“GitOps Beyond Kubernetes: Applying GitOps to VMs, and more” - Numon Amirov (Owner @ Subinc); 2️⃣“Lets Nix it.” - Sokhibjon Orzikulov (Head of OSS @ Uzinfocom); 3️⃣“Katta infrastrukturani boshqarishda monitoringning o'rni.” - Jahongir Yovmuddinov (Yetakchi mutahassis @ Mobiuz); 🔄 Meetup odatiy ravishda bepul boʻlib, soat 14:00 da boshlanadi, unda qatnashish uchun UzGeeks.uz saytida roʻyxatdan oʻtish kerak. 📍Manzil: Amir Temur ko‘chasi, 108 (Toshkent axborot texnologilari universiteti) 🎙Hamkorlar: ➡️ Oʻzbekiston Respublikasi Raqamli texnologiyalar vazirligi; ➡️ Raqamli ta'limni rivojlantirish markazi; ➡️ Thinkland. ➡️ Toshkent axborot texnologilari universiteti ➡️ Floss O'zbekiston. Sayt | Guruh | Kanal |Facebook | 💫 Donate