Support the ongoing development of →
Security Database Eloquent
Last updated 10 months ago.

You don't need to escape it. This is one of the reasons those helper methods are there - to take care of safe value binding. You only need to worry about escaping when you execute query manually or use DB::raw() method.


Correct. If you ever get a DB Query exception in Laravel, you can generally see the escaping that the framework does for you.

Last updated 8 years ago.

There is also one very useful method to check the queries that actually have been run:


When I want to know what was the real query, I do this immediately after running a query:

Last updated 8 years ago.

If that wasn't the solution, I don't know if one exists. hahaha. Awesome little tidbit right there.


Sign in to participate in this thread!


Your banner here too?

ottz0 ottz0 Joined 15 Nov 2014


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

Your logo here?

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

© 2023 - All rights reserved.