2026-07-01 18:35:39 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Modules\Core\Providers;
|
|
|
|
|
|
2026-07-03 02:15:31 +03:00
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
class CoreServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
2026-07-03 02:15:31 +03:00
|
|
|
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');
|
2026-07-03 02:15:31 +03:00
|
|
|
Blade::anonymousComponentPath(__DIR__ . '/../../resources/views', 'core');
|
2026-07-01 18:35:39 +03:00
|
|
|
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
|
|
|
|
|
|
2026-07-03 02:15:31 +03:00
|
|
|
$this->publishes([
|
|
|
|
|
__DIR__ . '/../../config/core.php' => config_path('core.php'),
|
|
|
|
|
], 'core-config');
|
|
|
|
|
|
2026-07-01 18:35:39 +03:00
|
|
|
$this->publishes([
|
2026-07-02 23:48:55 +03:00
|
|
|
__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]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|