jeudi 28 septembre 2017

Laravel DB Migrations in custom package

I have some experience in Laravel but I'm still learning (currently I'm using 5.4). I'm creating my own package (which will have its own database tables, but one of the tables will be related with the users table of the "main" application).

I know I can load the migrations on my Package's Service provider:

public function boot()
{
    $this->loadMigrationsFrom(__DIR__.'/path/to/migrations');
}

But I see loads of pages/tutorials telling to publish those migration files. Is there any advantage on doing this?

Honestly I would prefer to keep the migration files inside the package, but I would like to know if there are any drawbacks on doing this before finishing my package and deploy it in production.

Thanks in advance



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire