Implement DB::escape().
This commit is contained in:
parent
4f8a6724b0
commit
1081ac1b8a
|
@ -124,6 +124,19 @@ public static function raw($value)
|
||||||
{
|
{
|
||||||
return new Expression($value);
|
return new Expression($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Escape a string for usage in a query.
|
||||||
|
*
|
||||||
|
* This uses the correct quoting mechanism for the default database connection.
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function escape($value)
|
||||||
|
{
|
||||||
|
return static::connection()->pdo->quote($value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the profiling data for all queries.
|
* Get the profiling data for all queries.
|
||||||
|
|
Loading…
Reference in New Issue