Currently this is my view
{{ $leads }}
And this is the output
{\"error\":false,\"member\":[{\"id\":\"1\",\"firstName\":\"fi
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') @endpush