Skip to content

Commit

Permalink
resolve conflict in the migrations folder,by forcing to publish the m…
Browse files Browse the repository at this point in the history
…igration before migrating it.
  • Loading branch information
darbaoui committed Oct 27, 2021
1 parent 08a4cd3 commit 47851df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ composer require devinweb/laravel-hyperpay

## Database migration

`Laravel-hyperpay` provides a migration to handle its own transaction, don't forget to run the migration after installation
`Laravel-hyperpay` provides a migration to handle its own transaction, don't forget to publish the migration after installation

```bash
php artisan migrate
php artisan vendor:publish --tag="hyperpay-migrations"
```

If you want to make an update or change the path of the migration, you can publish it using `vendor:publish`
Then migrate

```bash
php artisan vendor:publish --tag="hyperpay-migrations"
php artisan migrate
```

This migration has a model named `Transaction`, if your app use [multi-tenancy](https://tenancy.dev/docs/hyn/5.5/installation), you can create a new transaction model based on the `hyperpay transaction` model.
Expand Down
12 changes: 0 additions & 12 deletions src/LaravelHyperpayServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public function boot()
$this->registerRoutes();
$this->registerResources();
$this->registerPublishing();
$this->registerMigrations();
}

/**
Expand Down Expand Up @@ -70,17 +69,6 @@ protected function registerPublishing()
}
}

/**
* Register the package migrations.
*
* @return void
*/
protected function registerMigrations()
{
if ($this->app->runningInConsole()) {
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
}
}

/**
* Register the application services.
Expand Down

0 comments on commit 47851df

Please sign in to comment.