public function register()
    {
        // Marge the CORS config.
        $this->mergeConfigFrom(__DIR__.'/../../config/lumen.php', 'cors');

        // Register the CORS server instance alias.
        $this->app->alias(CorsInterface::class, Cors::class);

        // Register CORS servise singleton.
        $this->app->singleton(CorsInterface::class, function ($app) {
            // Get CORS config.
            $config = $app['config']->get('cors');

            return new Cors($config);
        });
    }
public function register()
    {
        // Marge the CORS config.
        $this->mergeConfigFrom(__DIR__.'/../../config/lumen.php', 'cors');

        // Register the CORS server instance alias.
        $this->app->alias(CorsInterface::class, Cors::class);

        // Register CORS servise singleton.
        $this->app->singleton(CorsInterface::class, function ($app) {
            // Get CORS config.
            $config = $app['config']->get('cors');

            return new Cors($config);
        });
    }
public function register ( ) { // Marge the CORS config. $ this -> mergeConfigFrom ( __DIR__ . '/../../config/lumen.php' , 'cors' ) ; // Register the CORS server instance alias. $ this -> app -> alias ( CorsInterface :: class , Cors :: class ) ; // Register CORS servise singleton. $ this -> app -> singleton ( CorsInterface :: class , function ( $ app ) { // Get CORS config. $ config = $ app [ 'config' ] -> get ( 'cors' ) ; return new Cors ( $ config ) ; } ) ; }
Run the service provider register handle.

@return void

@author Seven Du <shiweidu@outlook.com>
Run the service provider register handle .