[Vuejs]-How sort by name in json response

0👍

Because you are doing pluck over your results, which give you id => full_name results. Your call should be:

User::where('status_symbol', User::ACTIVE)
    ->orderBy('name')
    ->get('name', 'surname', 'id')
    ->only(['full_name', 'id']);

Leave a comment