Answer the question
In order to leave comments, you need to log in
How to populate a database in Laravel 5 with directories?
There is Laravel 5.2 .
There are various directories in the old database
. I migrated all tables and fields to laravel migration.
Tell me how to export all the necessary data to seeds, so that when migrating the database, all directories are imported into the database.
Those. Interested in what would be created during the migration directories (which has already been done), then they are filled with data.
php artisan migrate
Answer the question
In order to leave comments, you need to log in
I think these links should point you in the right direction.
link1
link2
In the examples given, we are mainly talking about migrating the structure of tables, and there are only two options for loading data:
public function up()
{
$path = 'path_to_sql/dump.sql';
DB::unprepared(file_get_contents($path));
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question