Support the ongoing development of Laravel.io →
posted 10 years ago
Database
Last updated 2 years ago.
0

Most of the time I use the DB::raw to use functions inside eloquent queries.

Something similar to #1, since by the time it gets to the db query the data has been validated many times so I'm not so concerned about injections by that time.

I'm using a model file instead of the DB::table, but the code is relatively the same.

You could PR something, just remember that eloquent supports several db types so it would need to be cross compatible.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jyggen jyggen Joined 10 Dec 2014

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.

© 2025 Laravel.io - All rights reserved.