Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dk4210's avatar

Make data from query available for live search

Hello Guys,

I have a question here. I have the following code


 <!--Application-->
   <select class="form-control" id="application_id" name="application_id" required>
    <option value="">--- Please choose an application ---</option>
     @foreach($applications as $application)
      @if($application->deleted == 0 && $application->status != 0)
      <option value="{{$application->id}}">{{$application->name}}</option>
        @endif
        @endforeach
       </select>

1st thing I would like to do is convert this to a vue component and then make it so when I choose an option it makes a query and returns json to be used in a live search.

What approach would you take for this?

Thanks, Dan

0 likes
1 reply
bugsysha's avatar

Without more knowledge about the application and this specific use case, I think you should go with how you've described it.

1 like

Please or to participate in this conversation.