Passing props (array) to vue.js via blade (laravel)

Solution:1

<all-users :users='@json($users)'></all-users>

or

 <all-users :users='{{ json_encode($users) }}'></all-users>

Solution:2

To pass data from laravel to vue your best option is using the @json option provided by Laravel. So your code will be like so:

<all-users :users='@json($users)'></all-users>

Keep in mind that you need to use single quotations @json function. Also don’t forget to use “:” for your user prop otherwise it will be interpreted as string.

Laravel docs for json data: https://laravel.com/docs/master/blade#displaying-data