[Vuejs]-DB::table('table')->select returning empty string Laravel 6

1👍

You are not returning a value. You’re just performing the select.

Try returning it:

return response()->json([
  'data' => DB::table('fjl_groups')->select('id as value', 'nom as text')->get()
]);

Leave a comment