I'm working with laravel and vuejs2 project now I have this vuejs2
array
called voucher_items
and I have if statement in laravel blade
@if($item_offer <> '')
@foreach($item_offer['getItemOfferDetaleData'] as $detale)
// code here to pass data to vuejs2 array voucher_items
@endforeach
@endif
So how can I pass data from laravel
blade to vuejs2
array I tried this code
@if($item_offer <> '')
@foreach($item_offer['getItemOfferDetaleData'] as $detale)
@{{voucher_items.push({id,'1'})}}
@endforeach
@endif
But it didn't work with me