Currently this is my view
{{ $leads }}
And this is the output
{\"error\":false,\"member\":[{\"id\":\"1\",\"firstName\":\"fi
For such case, you can do like this
@foreach (json_decode($leads->member) as $member)
{{ $genre }}
@endforeach
If your data is coming from a model you can do:
App\Http\Controller\SomeController
public function index(MyModel $model)
{
return view('index', [
'data' => $model->all()->toJson(),
]);
}
index.blade.php
@push('footer-scripts')
<script>
(function(global){
var data = {!! $data !!};
console.log(data);
// [{..}]
})(window);
</script>
@endpush