🔥 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: The Elvis operator.
Jan 29, 2022
🔥 Laravel tip: the sole method
Feb 15, 2022