How to display JSON data readable way for users in laravel?
问题 In my controller i have like this public function show(Document $document){ $doc = DB::table('adjustments')->where('document_id', $document->id)->get(); return view('documents.show',compact('document','doc')); } In my view i have like this @foreach($doc as $user) <pre>{{ $user->before}}</pre> <pre>{{ $user->after}}</pre> @endforeach Im getting output like this {"title":"Nam beatae tempora nulla magnam accusantium neque eligendi magni.","body":"Unde doloremque omnis aspernatur atque illo