Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

275
Visualizações
laravel 8 don't run migrate file in packages folder

When run 'php artisan migrate' in windows os: laravel migrate all file (\database\migrations in root folder and in packages folder). But in Linux os just migrate file in \database\migrations of root folder. I have Database\migrations folder in packages folder and use the loadMigrationsFrom method in function boot() of service provider class. How do I can migrate all files in Linux?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I think the only way to do it right now is to manually go through all the migrations. You have to run the migration command on each of your sub-folders:

php artisan migrate --path=database/migrations/folder_name*

or you can add this to boot method in AppServiceProvider:

$mainPath = database_path('migrations'); $directories = glob($mainPath . '/*' , GLOB_ONLYDIR); $paths = array_merge([$mainPath], $directories);

$this->loadMigrationsFrom($paths);

over 4 years ago · Santiago Trujillo Relatório

0

You can give path to your migrate function like

php artisan migrate --path=database/migrations/packages
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda