PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / intervention / httpauth / src / Laravel / HttpAuthServiceProvider.php

HttpAuthServiceProvider.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.7.0, at vendor/intervention/httpauth/src/Laravel/HttpAuthServiceProvider.php

63 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Intervention\HttpAuth\Laravel;
4
5 use Illuminate\Support\ServiceProvider;
6 use Intervention\HttpAuth\HttpAuth;
7
8 class HttpAuthServiceProvider extends ServiceProvider
9 {
10 /**
11 * Indicates if loading of the provider is deferred.
12 *
13 * @var bool
14 */
15 protected $defer = false;
16
17 /**
18 * Bootstrap the application events.
19 *
20 * @return void
21 */
22 public function boot()
23 {
24 $this->publishes([
25 __DIR__ . '/../config/config.php' => config_path('httpauth.php')
26 ]);
27 }
28
29 /**
30 * Register the service provider.
31 *
32 * @return void
33 */
34 public function register()
35 {
36 // merge default config
37 $this->mergeConfigFrom(
38 __DIR__ . '/../config/config.php',
39 'httpauth'
40 );
41
42 // register singleton
43 $this->app->singleton('httpauth', function ($app) {
44 return HttpAuth::make($app['config']->get('httpauth'));
45 });
46
47 // bind classname
48 $this->app->bind('Intervention\HttpAuth\HttpAuth', function ($app) {
49 return HttpAuth::make($app['config']->get('httpauth'));
50 });
51 }
52
53 /**
54 * Get the services provided by the provider.
55 *
56 * @return array
57 */
58 public function provides()
59 {
60 return ['httpauth'];
61 }
62 }
63