Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

279
Views
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 answers
Answer question

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 Report

0

You can give path to your migrate function like

php artisan migrate --path=database/migrations/packages
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!