samedi 28 janvier 2017

Laravel - Populating dropdown with two columns as display type

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?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kdEr19
via IFTTT

Aucun commentaire:

Enregistrer un commentaire