app/Providers/AppServiceProvider.php
/**
     * Register any application services.
     *
     * @return void
     * @throws InvalidConfigurationException
     */
Register any application services.
@return void
@throws InvalidConfigurationException
Register any application services . @return void @throws InvalidConfigurationException
public function register()
    {
        if (!in_array(config('app.env'), ['local', 'testing', 'production'])) {
            throw new InvalidConfigurationException(
                sprintf("Environment must be one of [%s].", join('|', ['local', 'testing', 'production']))
            );
        }
        if (!$this->app->environment('production')) {
            $this->app->register(DuskServiceProvider::class);
            $this->app->register(TelescopeServiceProvider::class);
        }
    }
public function register ( ) { if ( ! in_array ( config ( 'app.env' ) , [ 'local' , 'testing' , 'production' ] ) ) { throw new InvalidConfigurationException ( sprintf ( " Environment must be one of [%s]. " , join ( '|' , [ 'local' , 'testing' , 'production' ] ) ) ) ; } if ( ! $ this -> app -> environment ( 'production' ) ) { $ this -> app -> register ( DuskServiceProvider :: class ) ; $ this -> app -> register ( TelescopeServiceProvider :: class ) ; } }
Register any application services.
Register any application services .