1
2
3
4
5
6
7
//src - https://stackoverflow.com/a/31201101
@section('content')
var participantsfrom = {!! json_encode($activity->participantsfrom) !!};
//then variable #participantsfrom# is accessible from your JS
with addon - https://github.com/laracasts/PHP-Vars-To-Js-Transformer/blob/master/readme.md
origin - https://www.pipiscrew.com/?p=16562 pass-php-data-to-javascript-on-laravel-blade-view