# wp-optimize/4.7.0/vendor/intervention/httpauth/src/Laravel/HttpAuthServiceProvider.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 4.7.0. 63 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/4.7.0/code/vendor/intervention/httpauth/src/Laravel/HttpAuthServiceProvider.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/4.7.0/raw/vendor/intervention/httpauth/src/Laravel/HttpAuthServiceProvider.php
- Modified: 2021-06-07T22:42:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/4.7.0/code/vendor/intervention/httpauth/src/Laravel/HttpAuthServiceProvider.php#L10-L20`.

```php
<?php

namespace Intervention\HttpAuth\Laravel;

use Illuminate\Support\ServiceProvider;
use Intervention\HttpAuth\HttpAuth;

class HttpAuthServiceProvider extends ServiceProvider
{
    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = false;

    /**
     * Bootstrap the application events.
     *
     * @return void
     */
    public function boot()
    {
        $this->publishes([
            __DIR__ . '/../config/config.php' => config_path('httpauth.php')
        ]);
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        // merge default config
        $this->mergeConfigFrom(
            __DIR__ . '/../config/config.php',
            'httpauth'
        );

        // register singleton
        $this->app->singleton('httpauth', function ($app) {
            return HttpAuth::make($app['config']->get('httpauth'));
        });

        // bind classname
        $this->app->bind('Intervention\HttpAuth\HttpAuth', function ($app) {
            return HttpAuth::make($app['config']->get('httpauth'));
        });
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return ['httpauth'];
    }
}

```
