Laravel Pro Tips
#routes #enums
š„Laravel 9 introduced enum route bindings! You can type-hint your enum and Laravel will cast the string value from the URL:
Martin Joo
#migrations #eloquent #uuid
In Laravel, working with UUIDs is as easy as with traditional IDs. You have a collection of methods to use within your migrations:
JuanDMeGon |Online Instructor |Software Engineer
#eloquent #enums #casts
ā”ļøUsing enums is a joy with Laravel. For example, you can cast string Eloquent properties to enum values using the casts property:
#carbon #dates
A pull request recently got merged into Laravel that allows you to use the "->when()" method on a PendingRequest š„ #laravel #php
Ash Allen š
#models #database #connections
You can configure models to use different database connections and still access the relationship normally. #Laravel
Cosme Escobedo
#cache #counters
š„ #Laravel Tip: I often find myself maintaining counters in the cache. Laravel makes this easy to do with āincrementā and ādecrementā methods. Perfect for when you donāt need to keep the values around in the database.
Matt Kingshott
#scheduler #commands
š„ #Laravel Tip: The task scheduler isnāt just a place where you set a command and time. It can do so much more, like emailing output on error, or pinging urls. Check it out.
#testing
Laravel testing tip š§Ŗ Get pretty output by using the built-in test command. Use --filter to run tests that contain a given string or a specific class.
Daniel Eckermann
#paths #helpers
Laravel Tip: Laravel has multiple built in Helpers for Path which you can use within your Application.
The Laravel Dev