Answer the question
In order to leave comments, you need to log in
How to make a migration while testing?
I'm trying to make a small package
It needs migration
Created, placed in src / migrations
In the PackageServiceProvider in the register method I wrote:
$this->loadMigrationsFrom(__DIR__ . '/migrations/2018_10_10_000000_create_tables.php');
// вот это работает (просто чтобы не подумали что вообще ничего не работает)
$this->mergeConfigFrom(
__DIR__ . '/config/account.php', 'account'
);
dd(DB::select("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name"));
Answer the question
In order to leave comments, you need to log in
Something tupanul and for some reason wrote a migration, you just had to specify the folder ..
Try moving the migrations to the boot method as written in the documentation: https://laravel.com/docs/5.7/packages#migrations
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question