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

Week 29/2022

This commit is contained in:
Samuel Štancl 2022-07-22 16:49:28 +02:00
parent 9ff2f9816b
commit cc3667933a
7 changed files with 82 additions and 2 deletions

View file

@ -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.'
---

View file

@ -0,0 +1,5 @@
---
username: nuernberger_me
name: 'Adrian Nürnberger 🐙'
avatar: 'https://pbs.twimg.com/profile_images/723494877489717248/TMw1-Osd_normal.jpg'
---

View file

@ -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

View file

@ -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.

View file

@ -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.

View file

@ -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. 🔥

View file

@ -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