Renderizar JSON en Laravel

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