theUnforgiven
1 month ago
274
3
Vue

Converting an include from Laravel to Vue

Posted 1 month ago by theUnforgiven

Hi all,

I have this in Laravel:

@foreach($section->questions->sortBy('order') as $question)
      @include('feedback.questions.' . $question->type, compact('question'))
@endforeach

I need to convert this into Vue, so the foreach is fine I've done that and that works, however I could do with adding on the sortBy() in vue and then including a vue template that will render which ever type is passed for form elements, like checkbox.vue, label.vue etc

How would one achieve such task....?

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