34 lines
693 B
PHP
Executable File
34 lines
693 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Debug;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\Debug\Commands\SystemDebug;
|
|
use App\Debug\Commands\FindDuplicateViews;
|
|
|
|
class DebugServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
$this->app->singleton('debug.analyzer', function ($app) {
|
|
return new Services\SystemAnalyzer();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
if ($this->app->runningInConsole()) {
|
|
$this->commands([
|
|
SystemDebug::class,
|
|
FindDuplicateViews::class,
|
|
]);
|
|
}
|
|
}
|
|
}
|