How I can create the initial database on migrations of laravel?
For when I do command
php artisan migrate
returns me the following message
[PDOException] SQLSTATE [HY000] [1049] Unknown database
Thanks
Artisan does not create the database, only database tables. You're going to need to create the DB yourself first (in whatever DB tools you have, not Laravel) then run run your migrations.
You cannot create a database through Laravel, you need to have one before-hand. If you use the MySQL default, do it through MySQL and then enter the database credentials in app/config/database.php
- including what the database is called. (Note that you will also need a user that has access to that database.)
If you have no idea what I'm talking about, you may want to use SQLite, since that doesn't require further knowledge about creating databases, and Laravel provides a sensible default. Again, you can configure this in the database configuration file.