You can do it like this..
@extends('layouts.app')
@section('script')
@endsection
@section('content')
@endsection
But better solution would be AJAX request to some controller that returns json data.
Best solution for you will this laravel package
laracasts/PHP-Vars-To-Js-Transformer