number6
3 years ago
146
3
Vue

Blade to Vue: Alternative to json_encode

Posted 3 years ago by number6

I forget which video it was in, but Jeffrey pointed out another way to pass a Laravel collection to vue. Currently I am using this. What is the other alternative to passing the collection data? Is it just {{ $private}}? Anyone remember what video that was in?

        <basictable
        :data="{{ json_encode($private) }}"
           :columns="{{ json_encode($columns) }}"
    >
    </basictable>

Please sign in or create an account to participate in this conversation.