Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 1 year ago.
0

Why should we always think the "laravel way". There is no "laravel way" for everything and that is not the proper way of thinking. Use tool and approach which suits your needs.

If you have some kind of reports with calculations, you can create View (Database view), and then just read values from that view. http://www.mysqltutorial.org/mysql-views-tutorial.aspx

Or you can use union to group more select queries into one: http://www.mysqltutorial.org/sql-union-mysql.aspx

I am not sure what is best for your needs, but you should have both options on mind. Sometimes move logic into the database layer can help you with optimisation too.

Last updated 9 years ago.
0

By Laravel way i just mean't something in Laravel that makes the process easier/quicker.. if there is something, why not use it?

Thanks for the links, will read :)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.