laravel 7 pass variable and array to javascript code example Example: laravel array to js var app = @json($array);