antonioribeiro / countries

Laravel countries and currencies
BSD 3-Clause "New" or "Revised" License
1.81k stars 278 forks source link

How to populate list of countries unto the drop down select list in blade. #121

Open Zikikizi opened 4 years ago

Zikikizi commented 4 years ago

Hi.

Am am actually new to php and laravel, but I am already working on a personal project. I need help with populating the countries list unto my registration select form, it comes totally blank. but when i dd($countries ) countries from controllers, it shows me the full list of countries, but the data is not passed unto the blade. My select list gets populated when i source data from a column in my database.

code to get list of all countries, it works when i die and dump $countries->all()->pluck('name.common')

blade code to display view, i also attached the @Artem-Schander @amenk @ralbear @Omranic @olimortimer

I only want to make use of list of continents, list of sub-continents, list of countries, list of states, list of cities and maybe their other names. But I do not need currencies, flags, population, taxes, timezones etc.

i do intend to use the knowledge to also populate cities and states. I know its a novice question, but please help out its urgent, i have been stuck here for days. could not get help on the web.

Thank you very very much for your help

Zikikizi commented 4 years ago

help

Zikikizi commented 4 years ago

There should be some kinda magic or good luck here, just after I requested for help here, the very first attempt i made actually solved the problem. Wow!

Thank you all for your intended help.

Naveedali1234 commented 4 years ago

@Zikikizi can you please let me know how you resolved it? i am also stuck in it and if you can demonstrate it, i will really appreciate it. i know it's been a while you posted the question but your help would be really appreciated.

Zikikizi commented 4 years ago

Hello bro, I actually opted to use geo data as it contains more data, exactly what I needed. However, I remember I was able to solve the issue, I will check my project and get back to you.

On Mon, 20 Jan 2020, 11:12 a.m. Naveed Ali, notifications@github.com wrote:

@Zikikizi https://github.com/Zikikizi can you please let me know how you resolved it? i am also stuck in it and if you can demonstrate it, i will really appreciate it. i know it's been a while you posted the question but your help would be really appreciated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/antonioribeiro/countries/issues/121?email_source=notifications&email_token=AMXG2HCFGVKM6BB5MDF7TNDQ6VTJNA5CNFSM4IHLQTRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJL4T3Y#issuecomment-576178671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXG2HHWLHJAS4SV4LDCUFTQ6VTJNANCNFSM4IHLQTRA .

Zikikizi commented 4 years ago

You can mail me 1benebene@gmail.com

On Tue, 21 Jan 2020, 12:26 a.m. Bene Bene, 1benebene@gmail.com wrote:

Hello bro, I actually opted to use geo data as it contains more data, exactly what I needed. However, I remember I was able to solve the issue, I will check my project and get back to you.

On Mon, 20 Jan 2020, 11:12 a.m. Naveed Ali, notifications@github.com wrote:

@Zikikizi https://github.com/Zikikizi can you please let me know how you resolved it? i am also stuck in it and if you can demonstrate it, i will really appreciate it. i know it's been a while you posted the question but your help would be really appreciated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/antonioribeiro/countries/issues/121?email_source=notifications&email_token=AMXG2HCFGVKM6BB5MDF7TNDQ6VTJNA5CNFSM4IHLQTRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJL4T3Y#issuecomment-576178671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXG2HHWLHJAS4SV4LDCUFTQ6VTJNANCNFSM4IHLQTRA .