Files
core/src/Providers/CoreServiceProvider.php
T

40 lines
1.3 KiB
PHP
Raw Normal View History

2026-07-01 18:35:39 +03:00
<?php
namespace Modules\Core\Providers;
use Illuminate\Support\Facades\Blade;
2026-07-01 18:35:39 +03:00
use Illuminate\Support\ServiceProvider;
use Modules\Core\Command\AnonymizeCommand;
use Modules\Core\Command\ExportCleanupCommand;
use Modules\Core\Command\ExportCommand;
use Modules\Core\Command\ImportCommand;
use Modules\Core\Command\MigrateImportCommand;
2026-07-01 18:35:39 +03:00
class CoreServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->mergeConfigFrom(__DIR__ . '/../../config/core.php', 'core');
}
2026-07-01 18:35:39 +03:00
public function boot(): void
{
$this->loadViewsFrom(__DIR__ . '/../../resources/views', 'core');
Blade::anonymousComponentPath(__DIR__ . '/../../resources/views', 'core');
2026-07-01 18:35:39 +03:00
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
$this->publishes([
__DIR__ . '/../../config/core.php' => config_path('core.php'),
], 'core-config');
2026-07-01 18:35:39 +03:00
$this->publishes([
__DIR__ . '/../../resources/logos' => public_path('static/logos/core'),
__DIR__ . '/../../resources/js/stoic_embed.js' => public_path('js/stoic_embed.js'),
2026-07-01 18:35:39 +03:00
], 'core-assets');
if ($this->app->runningInConsole()) {
$this->commands([AnonymizeCommand::class, ExportCommand::class, ExportCleanupCommand::class, ImportCommand::class, MigrateImportCommand::class]);
2026-07-01 18:35:39 +03:00
}
}
}