PHP code example of davidvandertuijn / laravel-json-escape

1. Go to this page and download the library: Download davidvandertuijn/laravel-json-escape library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

davidvandertuijn / laravel-json-escape example snippets


return response()->json_escape([
    "text" => "<p>Hello World</p>"
]);

return response()->json_escape([
    "text" => "Hello World",
    "html" => "<p>Hello World</p>"
], [
    "html"
]);