Answer the question
In order to leave comments, you need to log in
Can Laravel somehow help with preparing data for sending to the database?
Are there any functions in Laravel that, for example, would remove spaces from the login (when registering users), remove dangerous tags, and so on? Or use native functions like trim(), strip_tags, or a regular expression?
Answer the question
In order to leave comments, you need to log in
Laravel has a built-in middleware that trims all input data, TrimStrings. There is nothing built-in for other data sanitization logic. But there are third party packages, I would recommend this one https://github.com/daylerees/sanitizer
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question