\' single quote
\" double quote
\ backslash
\n new line
\r carriage return
\t tab
\b backspace
\f form feed
\v vertical tab (Internet Explorer 9 and older treats '\v as 'v instead of a vertical tab ('\x0B). If cross-browser compatibility is a concern, use \x0B instead of \v.)
LARACASTS_SNIPPET_PLACEHOLDER null character (U+0000 NULL) (only if the next character is not a decimal digit; else it is an octal escape sequence)
\xFF character represented by the hexadecimal byte "FF"
List of escape character that can be filtered by sqli_escape_string() php function?
suppose you wanted to send a string to your database like 'don't be foolish'
then the single quote in the middle of the string would mess up the sql syntax. Using this function a backslash is inserted to 'escape' the apostrophe so that mysql knows that it is part of the string and not the string terminator
eg 'don\'t be foolish'
but of course if this is used in this way, then now its not possible to have \ in a string, so backslash also escapes itself.
@davy_yg pdo with proper bindings takes care of escaping. Eloquent uses proper bindings also.
I use apostrophes often in a field name like O'brian. But if using eloquent, query builder, or pdo with bindings I have never had to manually escape this stuff.