From bd6a684102382c833f7caef95fab9c05b587b775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Sat, 4 Jun 2022 16:05:13 +0200 Subject: [PATCH] Week 22/2022 --- content/authors/enunomaduro.md | 2 +- content/threads/weekly-thread-2022-22.md | 11 +++++++++++ ...ive-can-significantly-clean-up-your-templates.md | 11 +++++++++++ ...erty-promotion-pairs-extremely-well-with-dtos.md | 11 +++++++++++ ...e-to-render-stuff-only-in-a-given-environment.md | 11 +++++++++++ ...-can-use-to-route-instead-of-redirect-gtroute.md | 13 +++++++++++++ 6 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 content/threads/weekly-thread-2022-22.md create mode 100644 content/tips/blades-at-class-directive-can-significantly-clean-up-your-templates.md create mode 100644 content/tips/class-constructor-property-promotion-pairs-extremely-well-with-dtos.md create mode 100644 content/tips/class-you-can-use-the-at-env-blade-directive-to-render-stuff-only-in-a-given-environment.md create mode 100644 content/tips/you-can-use-to-route-instead-of-redirect-gtroute.md diff --git a/content/authors/enunomaduro.md b/content/authors/enunomaduro.md index 9ff9882..c9fee18 100644 --- a/content/authors/enunomaduro.md +++ b/content/authors/enunomaduro.md @@ -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 ๐ŸคŒ๐Ÿป' --- diff --git a/content/threads/weekly-thread-2022-22.md b/content/threads/weekly-thread-2022-22.md new file mode 100644 index 0000000..4c81e74 --- /dev/null +++ b/content/threads/weekly-thread-2022-22.md @@ -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 ๐Ÿงต \ No newline at end of file diff --git a/content/tips/blades-at-class-directive-can-significantly-clean-up-your-templates.md b/content/tips/blades-at-class-directive-can-significantly-clean-up-your-templates.md new file mode 100644 index 0000000..75f77db --- /dev/null +++ b/content/tips/blades-at-class-directive-can-significantly-clean-up-your-templates.md @@ -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! ๐Ÿงน๐Ÿงน \ No newline at end of file diff --git a/content/tips/class-constructor-property-promotion-pairs-extremely-well-with-dtos.md b/content/tips/class-constructor-property-promotion-pairs-extremely-well-with-dtos.md new file mode 100644 index 0000000..6d1d12d --- /dev/null +++ b/content/tips/class-constructor-property-promotion-pairs-extremely-well-with-dtos.md @@ -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 \ No newline at end of file diff --git a/content/tips/class-you-can-use-the-at-env-blade-directive-to-render-stuff-only-in-a-given-environment.md b/content/tips/class-you-can-use-the-at-env-blade-directive-to-render-stuff-only-in-a-given-environment.md new file mode 100644 index 0000000..98911a7 --- /dev/null +++ b/content/tips/class-you-can-use-the-at-env-blade-directive-to-render-stuff-only-in-a-given-environment.md @@ -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? \ No newline at end of file diff --git a/content/tips/you-can-use-to-route-instead-of-redirect-gtroute.md b/content/tips/you-can-use-to-route-instead-of-redirect-gtroute.md new file mode 100644 index 0000000..1da243c --- /dev/null +++ b/content/tips/you-can-use-to-route-instead-of-redirect-gtroute.md @@ -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". โœจ \ No newline at end of file