Skip to content

Commit

Permalink
making migrations optional
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedvaziry committed Jan 6, 2022
1 parent 9400805 commit fd9474e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config/monitoring.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,10 @@
* Fill it if you want the Slack channel
*/
'slack_webhook_url' => env('MONITORING_SLACK_WEBHOOK_URL')
]
],

/*
* You can enable or disable migrations here
*/
'migrations' => true
];
5 changes: 5 additions & 0 deletions src/MonitoringServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public function register()
*/
public function boot()
{
// load migrations
if (config('monitoring.migrations', true) && $this->app->runningInConsole()) {
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations/');
}

// register command
$this->commands(RecordCommand::class);

Expand Down

0 comments on commit fd9474e

Please sign in to comment.