2017 © Pedro Peláez
 

laravel-package laravel-id-cities

Laravel ID Cities is a package for Laravel to supply all cities data to table cities. Start from data cities in Indonesia.

image

ferdirn/laravel-id-cities

Laravel ID Cities is a package for Laravel to supply all cities data to table cities. Start from data cities in Indonesia.

  • Tuesday, November 18, 2014
  • by ferdirn
  • Repository
  • 3 Watchers
  • 2 Stars
  • 115 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel ID Cities

Total Downloads Latest Stable Version Latest Unstable Version, (*1)

Laravel ID Cities is a package for Laravel to supply all cities data to table cities. Start from data cities in Indonesia., (*2)

If you need Laravel package to provide all Countries data for you, then you may want to install ferdirn/laravel-id-countries package., (*3)

If you need Laravel package to provide all Provinces data for you, then you may want to install ferdirn/laravel-id-provinces package., (*4)

Installation

Add ferdirn/laravel-id-cities to composer.json., (*5)

"ferdirn/laravel-id-cities": "dev-master"

or in console type command, (*6)

composer require ferdirn/laravel-id-cities:dev-master

Run composer update to pull down the latest version of laravel packages., (*7)

Edit app/config/app.php file and add to providers, (*8)

'providers' => array(
    'Ferdirn\Cities\CitiesServiceProvider',
)

also add to 'aliases', (*9)

'aliases' => array(
    'Cities' => 'Ferdirn\Cities\CitiesFacade',
)

Model

If you want to edit the configuration then publish the config. This is an optional step and unrecommended to do, it will show the table name and you do not need to alter it if you do not know what you are doing. The default table name is cities, if it suits you, leave it. But if you know what you are doing, you can run the following command, (*10)

$ php artisan config:publish ferdirn/laravel-id-cities

Then you need to generate the migration file. Run the following command:, (*11)

$ php artisan cities:migration

This process will generate <timestamp>_create_cities_table.php migration file and a CitiesSeeder.php seed file., (*12)

Insert the following code in the seeds/DatabaseSeeder.php, (*13)

//Seed the cities
$this->call('CitiesSeeder');
$this->command->info('Seeded the cities!');

Finally, you can run the artisan migrate command with seed option to include the seed data:, (*14)

$ php artisan migrate --seed

Now you have a table 'cities' with all cities data inside the table. Congratulation!, (*15)

The Versions

18/11 2014

dev-master

9999999-dev https://github.com/ferdirn/laravel-id-cities

Laravel ID Cities is a package for Laravel to supply all cities data to table cities. Start from data cities in Indonesia.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel cities indonesia

18/11 2014

v1.0

1.0.0.0 https://github.com/ferdirn/laravel-id-cities

Laravel ID Cities is a package for Laravel to supply all cities data to table cities. Start from data cities in Indonesia.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel cities indonesia