Example 1 a) Controller When using get() method, you can provide constraint that will return collection in array. If no object. This will return empty array [] public function search($search) { $group = Group::query($search) ->where(‘name’, ‘=’, $search) ->get(); return response()->json($group, 200); } b) Thus, in Store.js (Vuex). We can do like this. actions : {…