addslashes
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Quote string with slashes
addslashes
(
string $string
):
string
protected function
modifyComment
(
Blueprint $blueprint
,
Fluent $column
)
{
if (!
is_null
(
$column
->
comment
)) {
return
" comment '"
.
addslashes
(
$column
->
comment
).
"'"
;
}
}
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
return
rtrim
(
sprintf
(
'unique:%s,%s,%s,%s,%s'
,
$this
->
table
,
$this
->
column
,
$this
->
ignore
?
'"'
.
addslashes
(
$this
->
ignore
).
'"'
:
'NULL'
,
$this
->
idColumn
,
$this
->
formatWheres
()
),
','
);
src/Illuminate/Validation/Rules/Unique.php