1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-11 21:14:02 +00:00

Week 22/2022

This commit is contained in:
Samuel Štancl 2022-06-04 16:05:13 +02:00
parent e42fd0da62
commit bd6a684102
6 changed files with 58 additions and 1 deletions

View file

@ -1,5 +1,5 @@
---
username: enunomaduro
avatar: 'https://pbs.twimg.com/profile_images/1433501939648565257/hT4oXpfq_normal.jpg'
avatar: 'https://pbs.twimg.com/profile_images/1514432896102109185/LMj2oeW8_normal.jpg'
name: 'Nuno Maduro 🤌🏻'
---

View file

@ -0,0 +1,11 @@
---
slug: weekly-thread-2022-22
title: 'Weekly thread #22 of 2022'
tweet_id: '1532800036882374657'
author_username: archtechx
created_at: 2022-06-03T19:03:01+00:00
links: { }
---
🔥 This week's code tips for Laravel developers
A weekly thread 🧵

View file

@ -0,0 +1,11 @@
---
title: 'Blade''s @class directive can significantly clean up your templates'
tweet_id: '1532800041957568512'
thread_slug: weekly-thread-2022-22
author_username: xiCO2k
images:
- 'https://pbs.twimg.com/media/FUB1KVpWIAs25_Y.jpg'
created_at: 2022-06-03T19:03:02+00:00
slug: blades-at-class-directive-can-significantly-clean-up-your-templates
---
✅ The Laravel Blade Class Directive is really awesome, so much cleaner! 🧹🧹

View file

@ -0,0 +1,11 @@
---
title: 'Class 🔥 Constructor property promotion pairs extremely well with DTOs'
tweet_id: '1532800044725723136'
thread_slug: weekly-thread-2022-22
author_username: archtechx
images:
- 'https://pbs.twimg.com/media/FUKzQY_UcAIOA3t.jpg'
created_at: 2022-06-03T19:03:03+00:00
slug: class-constructor-property-promotion-pairs-extremely-well-with-dtos
---
🔥 PHP 8 has made DTOs *much* easier with constructor property promotion

View file

@ -0,0 +1,11 @@
---
title: 'Class 🔥 You can use the @env Blade directive to render stuff only in a given environment'
tweet_id: '1532800047418462208'
thread_slug: weekly-thread-2022-22
author_username: freekmurze
images:
- 'https://pbs.twimg.com/media/FT1tH1sWQAAaEwH.jpg'
created_at: 2022-06-03T19:03:04+00:00
slug: class-you-can-use-the-at-env-blade-directive-to-render-stuff-only-in-a-given-environment
---
🔥 Did you know that Laravel has a handy Blade directive to only render stuff in a given environment?

View file

@ -0,0 +1,13 @@
---
title: 'You can use `to_route` instead of `redirect()->route()`'
tweet_id: '1532800039315066880'
thread_slug: weekly-thread-2022-22
author_username: enunomaduro
images:
- 'https://pbs.twimg.com/media/FT811QpXoAMUMG_.jpg'
created_at: 2022-06-03T19:03:02+00:00
slug: you-can-use-to-route-instead-of-redirect-gtroute
---
Here is @laravelphp tip that makes your code more expressive. 💅
"Return to route profile". ✨