Renderowanie JSON w Laravel

<script>
    var app = <?php echo json_encode($array); ?>;
</script>
Akeem