nWidart / DbExporter

Export your database as a Laravel Migration. And export your DB data as a seed file. Finally sync all this with your remote server.
378 stars 84 forks source link

Updates to make package compatible with Laravel 5.1 #33

Closed anaxamaxan closed 8 years ago

anaxamaxan commented 8 years ago

Main changes in this pull request:

  1. Update DbExportHandlerServiceProvider::boot() and ::register() methods to use the L5 config publishes() style. This allows the config to get published via php artisan vendor:publish.
  2. Remove the $this->package('nwidart/db-exporter'); call from DbMigrationsServiceProvider::boot() method. It's enough to have it publishes() call in the export handler, so leave it empty.
  3. Register \Str alias in DbExportHandlerServiceProvider::loadAlias() because some users won't have \Str alias registered in their config/app.php, and you're already going the extra mile, so might as well do it for \Str too.
  4. Replace config strings using L4 style, e.g. Config::get('db-exporter::export_path.seeds') --> config('db-exporter.export_path.seeds')
  5. Replace Config::get() with config() just to be more consistent with Laravel docs.
anaxamaxan commented 8 years ago

oops, there's an incorrect config path... I'll resubmit this PR