1)
var data = {!!json_encode($collection, JSON_UNESCAPED_SLASHES|JSON_HEX_APOS)!!};
2)Or use
@json
directive
var data = @json($collection);
by გიორგი უზნაძე
3 years ago
0
Pro tip: use ```triple backticks around text``` to write in code fences