I am using the pluck api to get two columns and make a collection be passed in the view to make a dropdown menu.
Province::pluck('name', 'id');
It works fine and Province 'name' is displayed and id is used value. But I want to display two columns i.e name and total_population.
How can I do this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire