Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

highnoon's avatar

Sql injection and other malicious things

Laravel uses PDO to prevent sql injection, right? And, you can use {{ $data }} to escape html data. Are there any other subjects I might consider for validating user input/output, like following package maybe:

https://github.com/mewebstudio/Purifier

Thanks

0 likes
3 replies
Snapey's avatar

Strictly speaking, Laravel uses prepared statements to prevent sql injection - implemented with PDO. PDO itself does not stop you from passing user data directly in a sql statement.

And make sure you understand CSRF

Please or to participate in this conversation.