Skip to content

Commit

Permalink
refactor: update blog core service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jul 28, 2024
1 parent 1e96c07 commit 14198c7
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/Providers/BlogCoreServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ class BlogCoreServiceProvider extends ServiceProvider
*/
public function boot(): void
{
$routePath = __DIR__.'/../../routes/blog-core.php';
if (file_exists($routePath)) {
$this->loadRoutesFrom($routePath);
}

$this->loadTranslationsFrom(__DIR__.'/../../lang', 'blog-core');

$this->registerCommands();

$this->registerAssetLoading();

$this->registerAssetPublishing();
}

Expand Down Expand Up @@ -70,4 +65,17 @@ protected function registerAssetPublishing(): void
__DIR__.'/../../lang' => resource_path('lang/packages/blog-core'),
], 'lang');
}

/**
* @return void
*/
protected function registerAssetLoading(): void
{
$routePath = __DIR__.'/../../routes/blog-core.php';
if (file_exists($routePath)) {
$this->loadRoutesFrom($routePath);
}

$this->loadTranslationsFrom(__DIR__.'/../../lang', 'blog-core');
}
}

0 comments on commit 14198c7

Please sign in to comment.