7
π₯ Name contracts as descriptors and implementations as orders
A great tip from Luke @LukeDowning19,
"Name contracts as descriptions and implementations as orders"
#laracon
π₯ Last week's code tips for Laravel developers
A weekly thread π§΅
7
A great tip from Luke @LukeDowning19,
"Name contracts as descriptions and implementations as orders"
#laracon
6
π₯ In Laravel 9, you'll be able to use the cool new "checked" Blade directive.
This is going to be a nice addition that we can use to clean up our Blade views a little bit
#laravel #php
5
The str
helper in @laravelphp v9 is π₯
4
π‘ As of @laravelphp v8.36.0, you can skip 'TransformRequests' middlewares by registering a callback.
For example, you can use it on 'TrimStrings' and 'ConvertEmptyStringsToNull'.
#Laravel #PHP #webdev
3
π₯Laravel 9 introduced enum route bindings!
You can type-hint your enum and Laravel will cast the string value from the URL:
2
π₯ Cool tidbit I learned during @LukeDowning19 βs talk.
You can add a $bindings
array to a service provider to bind things.
https://laravel.com/docs/9.x/providers#the-bindings-and-singletons-properties #laravel #php
1
TIL about @laravelphp policy() helper. Give it a model and it will resolve the policy for you.
Very useful when testing policies behavior. πͺ
We're writing a book, you can get it for free here. We're writing a book! Join the early access to get it for free.