1

I am trying to install this package on my server after installing everything when I try to migrate with php artisan migrate it tells me there is nothing to migrate. Also the migration table is not there. here is what I did:

  1. php composer.phar require igaster/laravel_cities

  2. change in providers app.php

    Igaster\LaravelCities\GeoServiceProvider::class,

Ran this script

mkdir storage/geo
cd storage/geo
wget http://download.geonames.org/export/dump/allCountries.zip && unzip allCountries.zip && rm allCountries.zip
wget http://download.geonames.org/export/dump/hierarchy.zip && unzip hierarchy.zip && rm hierarchy.zip

Now when I run php artisan migrate it tells me there is nothing to migrate

I am not sure if this is because I have php composer.phar instead of composer?

Hiren Gohel
  • 4,942
  • 6
  • 29
  • 48
  • @Hina, You should run `composer dump-autoload` and then give `php artisan migrate:refresh` a try. This will remove all current migrations and re migrate them – Option Oct 05 '17 at 11:27
  • @Option the migrate:refresh commands creates all tables except this one, its also not included in the migrations table –  Oct 05 '17 at 11:31
  • @Hina, I have just edited my comment. Give that a try ^ – Option Oct 05 '17 at 11:31
  • 1
    @Hina `php artisan vendor:publish --provider="Igaster\LaravelCities\GeoServiceProvider"` – rbaskam Oct 05 '17 at 11:46
  • still nothing to migrate –  Oct 05 '17 at 11:56

4 Answers4

2

Try php artisan config:cache then retype php artisan migrate - Hope this helpfull...

0

php composer.phar is identical to composer so thats not the issue.

If migration file not showing you likely need to run

php artisan vendor:publish
Mark Walker
  • 1,199
  • 11
  • 20
0

Try running:

php artisan vendor:publish --provider="Igaster\LaravelCities\GeoServiceProvider"

And then run the migration

php artisan migrate
rbaskam
  • 749
  • 7
  • 22
aaron0207
  • 2,293
  • 1
  • 17
  • 24
  • I get this error when running the command [Symfony\Component\Console\Exception\RuntimeException] Too many arguments, expected arguments "command". –  Oct 05 '17 at 11:55
  • 1
    I miss to add "--" right before provider. Thanks @rbaskam for edit suggestion. Try now – aaron0207 Oct 05 '17 at 12:02
  • If it still failling you can publish files "manually" , just copy the files inside `vendor/igaster/laravel_cities/src/migrations` to your migrations folder – aaron0207 Oct 05 '17 at 12:04
0

Copy vendor/igaster/laravel_cities/src/migrations folder contents to database\migrations folder, then run php artisan migrate. Sometimes publishing vendor resources doesn't work for me too and I dive into the source of the package then to make them work.

Taha Paksu
  • 15,371
  • 2
  • 44
  • 78