laravel模型返回转义文本

时间:2015-07-16 14:53:53

标签: php string laravel escaping

我通过模型从我的数据库中获取一些数据,返回的数据需要跨平台,因此我希望能够返回编码/转义数据和未编码/未转换数据。

我现在返回的数据如下所示:

  "content": "<p>Things which the client likes or that you think are an appropriate direction to go in.</p><div>  
<iframe src=\"//www.youtube.com/embed/zjwS_0WV-1Q\" width=\"425\" height=\"350\"></iframe></div>",

理想情况下,我想在没有斜杠的情况下提供这个的简单版本,数据作为数组返回。有没有办法逃避数组中的所有数据?

0 个答案:

没有答案