๐Ÿ”ฅ Weekly thread #29 of 2022

๐Ÿ”ฅ 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

HTTP response status can be customized when denying actions via Gates & Policies

4

๐Ÿ”ฅ HTTP response status can be customized when denying actions via Gates & Policies

HTTP response status can be customized when denying actions via Gates & 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.

Use `$wire.entangle()` instead of `$entangle`

2

๐Ÿ”ฅ Use `$wire.entangle()` instead of `$entangle`

Use `$wire.entangle()` 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. ๐Ÿ”ฅ

We're writing a book, you can get it for free here.