Skip to content

Commit

Permalink
Обновление AnalyticsServiceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashagm committed Jul 10, 2023
1 parent 44c7555 commit d399b65
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions src/Providers/AnalyticsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,45 @@ public function register(): void
*/


public function boot()
{

public function boot()
{

$this->loadRoutesFrom(__DIR__.'/../routes/analytics.php');
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
$this->mergeConfigFrom(
__DIR__.'/../config/analytics.php', 'analytics'
);

if ($this->app->runningInConsole()) {
$this->commands([
InstallCommand::class,
]);
}
$this->registerRouter();

$this->starting();
$this->registerMigrate();

$this->publishFiles();


$this->registerCommands();

$this->starting();
}


protected function registerCommands()
{
if ($this->app->runningInConsole()) {
$this->commands([
InstallCommand::class,
]);
}
}

protected function registerRouter()
{
$this->loadRoutesFrom(__DIR__ . '/../routes/analytics.php');
}

protected function registerMigrate()
{
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
}



protected function publishFiles()
{
$this->mergeConfigFrom(
__DIR__ . '/../config/analytics.php',
'analytics'
);
}
}

0 comments on commit d399b65

Please sign in to comment.