mardi 26 février 2019

How to format json data in laravel?

I need to format this data in html and css and get ride of the json format and show only text.

Displayed data:

{"id":"<h3>...............................................<h3><br \\> 
<h1>rzNC35gDNG6moR3w<h1>"}

Controller:

function requete()
{
    $id = Str::random();
    $res = '<h3>...............................................<h3>'
        ."<br \><h1>".$id.'<h1>';
    return response()->json(['id' => $res]);
}

View:

$(document).ready(function() {   
     $.ajax({
            url:"",                              
     });
});



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2NuPCyu
via IFTTT

Aucun commentaire:

Enregistrer un commentaire