Seperated Migration Directories

April 6th, 2023 · LinkedIn

Efficiently managing your Laravel migration files is crucial for seamless development. One way to do it is by organizing them into separate directories. This helps keep your codebase organized and easy to navigate.

// app/Providers/AppServiceProvider.php
 
protected function boot()
{
$this->loadMigrationsFrom([
database_path() . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . 'Client',
]);
}