PHP Classes

File: readme.md

Recommend this page to a friend!
  Classes of Faisal Islam   Multiple Laravel Migration Path Directories   readme.md   Download  
File: readme.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Multiple Laravel Migration Path Directories
Add custom directories for Laravel migration files
Author: By
Last change:
Date: 5 years ago
Size: 1,440 bytes
 

Contents

Class file image Download

Laravel Migration Paths

During the periodical development phase the migrations folder may become very large. It is very helpful if we can organize the content of the migration folders. This library helps to organize migration files in different folders. Even, if your organize your existing files it will works as well.

Installations:

Use Composer to install the library.

composer require nscreed/laravel-migration-paths

After updating composer, add the service provider to the providers array in config/app.php

NsCreed\MigrationPath\ServiceProvider::class,

Laravel 5.5 uses Package Auto-Discovery, so does not require you to manually add the ServiceProvider.

Usages

By default all folders under the migrations directory will be registered for migrations.

But, if you like to add custom directories which is not under the migrations folder you have to publish the config first.

php artisan vendor:publish --provider="NsCreed\MigrationPath\ServiceProvider" --tag="config"

Add your custom directories:

'paths' => [
    database_path('migrations'),
    'path/to/custom_migrations', // Your Custom Migration Directory
],

License

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.