From cc3667933aa07de4879681577952c3ad25465619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 22 Jul 2022 16:49:28 +0200 Subject: [PATCH] Week 29/2022 --- content/authors/JuanDMeGon.md | 4 ++-- content/authors/nuernberger_me.md | 5 +++++ content/threads/weekly-thread-2022-29.md | 19 +++++++++++++++++++ ...available-on-the-eloquent-query-builder.md | 13 +++++++++++++ ...-denying-actions-via-gates-amp-policies.md | 15 +++++++++++++++ .../use-wireentangle-instead-of-entangle.md | 15 +++++++++++++++ ...at-a-job-will-be-deleted-from-the-queue.md | 13 +++++++++++++ 7 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 content/authors/nuernberger_me.md create mode 100644 content/threads/weekly-thread-2022-29.md create mode 100644 content/tips/dump-and-dd-are-available-on-the-eloquent-query-builder.md create mode 100644 content/tips/http-response-status-can-be-customized-when-denying-actions-via-gates-amp-policies.md create mode 100644 content/tips/use-wireentangle-instead-of-entangle.md create mode 100644 content/tips/you-can-assert-that-a-job-will-be-deleted-from-the-queue.md diff --git a/content/authors/JuanDMeGon.md b/content/authors/JuanDMeGon.md index eb0e0a6..fd95353 100644 --- a/content/authors/JuanDMeGon.md +++ b/content/authors/JuanDMeGon.md @@ -1,5 +1,5 @@ --- username: JuanDMeGon -name: 'Juan David Meza' -avatar: 'https://pbs.twimg.com/profile_images/1372280622232768513/NaNa6jTD_normal.jpg' +avatar: 'https://pbs.twimg.com/profile_images/1500323412874518537/2dwFOO6c_normal.jpg' +name: 'JuanDMeGon | Online Instructor | Sr. Software Eng.' --- diff --git a/content/authors/nuernberger_me.md b/content/authors/nuernberger_me.md new file mode 100644 index 0000000..9f8d31e --- /dev/null +++ b/content/authors/nuernberger_me.md @@ -0,0 +1,5 @@ +--- +username: nuernberger_me +name: 'Adrian NΓΌrnberger πŸ™' +avatar: 'https://pbs.twimg.com/profile_images/723494877489717248/TMw1-Osd_normal.jpg' +--- diff --git a/content/threads/weekly-thread-2022-29.md b/content/threads/weekly-thread-2022-29.md new file mode 100644 index 0000000..c79f77f --- /dev/null +++ b/content/threads/weekly-thread-2022-29.md @@ -0,0 +1,19 @@ +--- +slug: weekly-thread-2022-29 +title: 'Weekly thread #29 of 2022' +tweet_id: '1550466495032897544' +author_username: archtechx +created_at: 2022-07-22T13:03:13+00:00 +links: { } +--- +πŸ”₯ This week's updates and code tips for Laravel developers include: + +πŸš€ Laravel 9.21 released +🌟 New updates in Vapor +🍺 Pint included by default +✨ Vite 3 support across the ecosystem +πŸ“˜ Laravel Model Pruning on Codecourse + +and more... + +Thread #130 \ No newline at end of file diff --git a/content/tips/dump-and-dd-are-available-on-the-eloquent-query-builder.md b/content/tips/dump-and-dd-are-available-on-the-eloquent-query-builder.md new file mode 100644 index 0000000..cc33785 --- /dev/null +++ b/content/tips/dump-and-dd-are-available-on-the-eloquent-query-builder.md @@ -0,0 +1,13 @@ +--- +title: 'dump() and dd() are available on the Eloquent Query Builder ' +tweet_id: '1550466500288397313' +thread_slug: weekly-thread-2022-29 +author_username: ecrmnn +images: + - 'https://pbs.twimg.com/media/FX9mC2ZUUAEM7Nn.jpg' +created_at: 2022-07-22T13:03:14+00:00 +slug: dump-and-dd-are-available-on-the-eloquent-query-builder +--- +TIL, in Laravel you can display debug information about the current query with dump() and dd() πŸ€™ + +This allows you to see the underlying query and bindings. \ No newline at end of file diff --git a/content/tips/http-response-status-can-be-customized-when-denying-actions-via-gates-amp-policies.md b/content/tips/http-response-status-can-be-customized-when-denying-actions-via-gates-amp-policies.md new file mode 100644 index 0000000..d158715 --- /dev/null +++ b/content/tips/http-response-status-can-be-customized-when-denying-actions-via-gates-amp-policies.md @@ -0,0 +1,15 @@ +--- +title: 'HTTP response status can be customized when denying actions via Gates & Policies ' +tweet_id: '1550466517061447682' +thread_slug: weekly-thread-2022-29 +author_username: timacdonald87 +images: + - 'https://pbs.twimg.com/media/FXqQk8faIAAEExm.jpg' +created_at: 2022-07-22T13:03:18+00:00 +slug: http-response-status-can-be-customized-when-denying-actions-via-gates-amp-policies +--- +πŸ”πŸ§΅ I added a small, but pretty nice, security enhancement in Laravel v9.20.0 + +When denying actions via Gates & Policies in Laravel, you can now customise the HTTP response status that is returned + +This allows you to deny access, while hiding the existence of your resources. \ No newline at end of file diff --git a/content/tips/use-wireentangle-instead-of-entangle.md b/content/tips/use-wireentangle-instead-of-entangle.md new file mode 100644 index 0000000..0c74282 --- /dev/null +++ b/content/tips/use-wireentangle-instead-of-entangle.md @@ -0,0 +1,15 @@ +--- +title: 'Use `$wire.entangle()` instead of `$entangle` ' +tweet_id: '1550466505782874113' +thread_slug: weekly-thread-2022-29 +author_username: JuanDMeGon +images: + - 'https://pbs.twimg.com/media/FXu2k3xVEAMUFKg.jpg' +created_at: 2022-07-22T13:03:15+00:00 +slug: use-wireentangle-instead-of-entangle +--- +TIL: + +In Laravel Livewire, it's better sometimes to use wire.entangle(), instead of the entangle directive, avoids weird issues like "invalid or unexpected token." + +Thanks, @samuelstancl, for posting that gem. πŸ”₯ \ No newline at end of file diff --git a/content/tips/you-can-assert-that-a-job-will-be-deleted-from-the-queue.md b/content/tips/you-can-assert-that-a-job-will-be-deleted-from-the-queue.md new file mode 100644 index 0000000..d3b6247 --- /dev/null +++ b/content/tips/you-can-assert-that-a-job-will-be-deleted-from-the-queue.md @@ -0,0 +1,13 @@ +--- +title: 'You can assert that a job will be deleted from the queue ' +tweet_id: '1550466511432650753' +thread_slug: weekly-thread-2022-29 +author_username: nuernberger_me +images: + - 'https://pbs.twimg.com/media/FYA56XjXwAQSuf8.jpg' +created_at: 2022-07-22T13:03:17+00:00 +slug: you-can-assert-that-a-job-will-be-deleted-from-the-queue +--- +πŸ”₯ #Laravel testing tip + +Asserting that a job will be deleted from the queue \ No newline at end of file