Avoid queries in Blade when possible
- ·
- Telegram
- ·
- Newsletter
Sometimes you may want to execute DB queries in blade. There are some ok use cases for this, such as in layout files.
But if it's a view returned by a controller, pass the data in the view data instead.