diff --git a/content/authors/JustinBTechGuy.md b/content/authors/JustinBTechGuy.md new file mode 100644 index 0000000..62e793c --- /dev/null +++ b/content/authors/JustinBTechGuy.md @@ -0,0 +1,5 @@ +--- +username: JustinBTechGuy +name: 'Justin Byrne' +avatar: 'https://pbs.twimg.com/profile_images/992054782130032640/86q1ZDeK_normal.jpg' +--- diff --git a/content/authors/morrislaptop.md b/content/authors/morrislaptop.md new file mode 100644 index 0000000..6869c80 --- /dev/null +++ b/content/authors/morrislaptop.md @@ -0,0 +1,5 @@ +--- +username: morrislaptop +name: 'Craig Morris' +avatar: 'https://pbs.twimg.com/profile_images/1392560435942019072/24MDzj0X_normal.jpg' +--- diff --git a/content/threads/weekly-thread-2022-21.md b/content/threads/weekly-thread-2022-21.md new file mode 100644 index 0000000..ebb8f9f --- /dev/null +++ b/content/threads/weekly-thread-2022-21.md @@ -0,0 +1,11 @@ +--- +slug: weekly-thread-2022-21 +title: 'Weekly thread #21 of 2022' +tweet_id: '1530215255732649985' +author_username: archtechx +created_at: 2022-05-27T15:52: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/laravels-http-client-lets-you-easily-define-retry-attempts-and-a-timeout.md b/content/tips/laravels-http-client-lets-you-easily-define-retry-attempts-and-a-timeout.md new file mode 100644 index 0000000..0fe2546 --- /dev/null +++ b/content/tips/laravels-http-client-lets-you-easily-define-retry-attempts-and-a-timeout.md @@ -0,0 +1,15 @@ +--- +title: 'Laravel''s Http client lets you easily define retry attempts and a timeout' +tweet_id: '1530215263517298688' +thread_slug: weekly-thread-2022-21 +author_username: freekmurze +images: + - 'https://pbs.twimg.com/media/FTosQF5WUAYV3PM.jpg' +created_at: 2022-05-27T15:52:03+00:00 +slug: laravels-http-client-lets-you-easily-define-retry-attempts-and-a-timeout +--- +😍 Laravel’s Http client is amazing. Using just a bit of code, you can specify a timeout, retry attempts, and immediately get the result as JSON. + +Is there any other HTTP client written in #php that makes it this easy? + +💪 Laravel \ No newline at end of file diff --git a/content/tips/when-creating-jobs-only-accept-the-needed-data.md b/content/tips/when-creating-jobs-only-accept-the-needed-data.md new file mode 100644 index 0000000..2be1081 --- /dev/null +++ b/content/tips/when-creating-jobs-only-accept-the-needed-data.md @@ -0,0 +1,12 @@ +--- +title: 'When creating jobs, only accept the needed data' +tweet_id: '1530215258135990272' +thread_slug: weekly-thread-2022-21 +author_username: morrislaptop +images: + - 'https://pbs.twimg.com/media/FTihMVRXoAIt4AF.jpg' + - 'https://pbs.twimg.com/media/FTihNyPWIAAAsbE.jpg' +created_at: 2022-05-27T15:52:02+00:00 +slug: when-creating-jobs-only-accept-the-needed-data +--- +When creating Laravel Jobs, only accept the data you need to handle the job instead of large wrapper objects / models \ No newline at end of file diff --git a/content/tips/you-can-avoid-many-n1-issues-by-using-lateral-joins-in-mysql.md b/content/tips/you-can-avoid-many-n1-issues-by-using-lateral-joins-in-mysql.md new file mode 100644 index 0000000..cc0b9ce --- /dev/null +++ b/content/tips/you-can-avoid-many-n1-issues-by-using-lateral-joins-in-mysql.md @@ -0,0 +1,16 @@ +--- +title: 'You can avoid many n+1 issues by using lateral joins in MySQL' +tweet_id: '1530215268915417089' +thread_slug: weekly-thread-2022-21 +author_username: tobias_petry +images: + - 'https://pbs.twimg.com/media/FTmHagcX0AEBn_k.jpg' +created_at: 2022-05-27T15:52:04+00:00 +slug: you-can-avoid-many-n1-issues-by-using-lateral-joins-in-mysql +--- +⚡️ Database Tip + +Sometimes you want to get e.g. the last three orders for *every* customer. Normal joins can't do that. You have to execute n+1 queries in code, which is slow! + +But with lateral joins, you can do one for-each loop join in SQL 🤯 +https://sqlfordevs.io/for-each-loop-lateral-join \ No newline at end of file diff --git a/content/tips/you-can-pass-a-custom-view-to-the-artisan-down-command.md b/content/tips/you-can-pass-a-custom-view-to-the-artisan-down-command.md new file mode 100644 index 0000000..f79bc48 --- /dev/null +++ b/content/tips/you-can-pass-a-custom-view-to-the-artisan-down-command.md @@ -0,0 +1,11 @@ +--- +title: 'You can pass a custom view to the artisan down command' +tweet_id: '1530215260837142529' +thread_slug: weekly-thread-2022-21 +author_username: JustinBTechGuy +images: + - 'https://pbs.twimg.com/media/FTROCoIWQAA54pF.jpg' +created_at: 2022-05-27T15:52:02+00:00 +slug: you-can-pass-a-custom-view-to-the-artisan-down-command +--- +TIL that you can use your own blade file for the maintenance mode screen in #Laravel by using the render option \ No newline at end of file