23 lines
804 B
PHP
23 lines
804 B
PHP
<?php
|
|
namespace Modules\Content\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Modules\Content\Console\InstallSaaslandContent;
|
|
use Modules\Content\Services\PageRenderer;
|
|
|
|
final class ContentServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
$this->mergeConfigFrom(module_path('Content','Config/config.php'),'content');
|
|
$this->app->singleton(PageRenderer::class);
|
|
}
|
|
public function boot(): void
|
|
{
|
|
$this->loadMigrationsFrom(module_path('Content','Database/Migrations'));
|
|
$this->loadViewsFrom(module_path('Content','Resources/views'),'content');
|
|
$this->loadRoutesFrom(module_path('Content','Routes/web.php'));
|
|
if ($this->app->runningInConsole()) $this->commands([InstallSaaslandContent::class]);
|
|
}
|
|
}
|