Download the PHP package zalanihir/country-state-city without Composer
On this page you can find all versions of the php package zalanihir/country-state-city. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zalanihir/country-state-city
More information about zalanihir/country-state-city
Files in zalanihir/country-state-city
Package country-state-city
Short Description Laravel package for country, state, city providers with the flags
License MIT
Informations about the package country-state-city
Laravel Country, State, City Seeder Package
Hi, I created a package for country, state & and city seeder. You can install and use it in your laravel project. If you are using this package then you can give it a star this package is free, In the future I Will add the country code & phone initials.
What is this library?
This is a library called CSC aka Country-State-City Seeders. While developing, I faced the issues so often that where can I get the seeder files? & how can I manage it? Is there a relationship or not?
So I googled & found some seeders files & with that help, I made this library which already has a relationship between their models.
Why do you need this?
If your project needs the country state & city dropdown & you have no idea about how it works I already made the library for it. Here are some of the points.
-
Open Source & Free
-
Easy to install
-
Easy to modify
- Models have already a relationship
For Installation
- To install this package you have to install this package using composer.
Note:
Make sure you do not have any country, state & city models or migrations then remove it other this will create conflicts.
How to install it?
For Publishers
For Laravel 10 or Laravel 9
you have to add the bellow line in in section.
For Laravel 11
you have to add the bellow line in which is In the bootstrap folder.
publishing command
The previous command publishes the files in your project.
Now you can simply run the following commands.
This will clear your caches
This will migrate the tables into databases.
Now add this line in your file.
Now Simplay runs the following command for the seed of the database.
The CountryModel, CityModel & StateModel has already relationships you do not have to worry about relationships & more than that I updated the Country Model, Migration & DataProvider and I added the iso2, iso3, numcode & country phonecode & country Flags as well.
Country Flags
In order to use the country flages you have to first get the flags by using bellow command.
After the command you will see that in your public folder there is one more folder will be added named flags.So now you have to just use it Here I will give you a basic example of that how to use it you can customize it for sure as per your need.
Friendly Note
if you have any query about this package face some error or need support to update simply mail me [email protected].
I get the all flags from the So the which size is 64 This would take alot time to manage it & some of countries's flags I did not get I will be updated soon if you want to update it & contribute in the project you can do it as well this will be vary helpfull for me. Thank you.
Connect with me
Contributors
Thank you to all the wonderful people who contributed to this project!
Zala Nihir |
Want to contribute? Check out our Contributing Guidelines.
Other Project
Check my Admin Panel