public function register(): void
    {
        $this->commands($this->commands);

        $this->app->singleton(Dashboard::class, function () {
            return new Dashboard();
        });

        if (! Route::hasMacro('screen')) {
            Route::macro('screen', function ($url, $screen, $name = null) {
                /* @var \Illuminate\Routing\Router $this */
                return $this->any($url.'/{method?}/{argument?}', [$screen, 'handle'])
                    ->name($name);
            });
        }

        if (! defined('PLATFORM_PATH')) {
            /*
             * Get the path to the ORCHID Platform folder.
             */
            define('PLATFORM_PATH', realpath(__DIR__.'/../../../'));
        }

        $this->mergeConfigFrom(
            realpath(PLATFORM_PATH.'/config/platform.php'), 'platform'
        );
    }