1

I have a Laravel project new. I want to migrate the database and initialize the database. so inside new project I have

vendor/bin(folders)/phinx.php(file)

I want to migrate the database and initialize tables I tried:

vendor/bin/phinx migrate(not working)

/var/www/html/new/vendor/bin $ cd phinx seed:run

but

bash: cd: phinx: Not a directory

I am new to laravel, how can I do this?

Tridev Shrestha
  • 447
  • 7
  • 21
traker
  • 101
  • 1
  • 1
  • 9
  • Are you trying to migrate some tables of a package ? – Teoman Tıngır Feb 26 '19 at 06:04
  • Is phinx a package you installed? Other than that there's [documentation on migration](https://laravel.com/docs/5.7/migrations) available, basically you run `php artisan migrate` to run migrations. If you have a 3rd party package with migrations you'd first need to `php artisan vendor:publish` to publish those migrations to the `database/migrations` folder – brombeer Feb 26 '19 at 06:32

1 Answers1

1

please try this for create database table

/var/www/html/new $ vendor/bin/phinx migrate(no need of cd)

and intialize tables

  /var/www/html/new $ vendor/bin/phinx seed:run
Shanu k k
  • 1,235
  • 2
  • 18
  • 43