0

Is it possible to create schemas automatically in the database when xampp is turning on? There is no information about it in the Laravel documentation, documentation says only how to do it manually by writing the command php artisan migrate.

1
  • There's no way out of the box to automatically run migrations based on your webserver status change. Continuous integration (Jenkis, TravisCI, etc.) can do this by setting jobs (git pull ..., followed by php artisan migrate, etc.), but that is quite a broad concept. Commented Dec 10, 2019 at 19:29

2 Answers 2

2

Xampp includes a script called apache_startup.bat in the root directory, you can add the following line to it

c:\xampp\php\php.exe -f /path/to/laravel/app/artisan migrate

Then when the apache server starts, it should run that the equivalent of php artisan migrate to setup the database.

Sign up to request clarification or add additional context in comments.

Comments

0

You can do php artisan make:migration [migration-name] - other than that, you have to fill the rest yourself.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.