🔥 Laravel Tip: Default Models
Apr 22, 2022
In your relationships, you can define default models.
That way if the relationship doesn't exist it will return a default model so you don't have to check if is null every time.
That way if the relationship doesn't exist it will return a default model so you don't have to check if is null every time.
Other tips:
🔥 Laravel Tip: orderByPivot
Nov 4, 2022
🔥 Laravel Tip: Accessor Caching
Apr 13, 2022