1 | <?php |
||
2 | |||
3 | namespace Yajra\Disqus; |
||
4 | |||
5 | use Illuminate\Contracts\Http\Kernel; |
||
6 | use Illuminate\Support\ServiceProvider; |
||
7 | |||
8 | class DisqusServiceProvider extends ServiceProvider |
||
9 | { |
||
10 | /** |
||
11 | * Bootstrap any application services. |
||
12 | * |
||
13 | * @return void |
||
14 | */ |
||
15 | public function boot() |
||
16 | { |
||
17 | $this->publishConfig(); |
||
18 | |||
19 | $this->registerMiddleware(); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Register and publish the config. |
||
24 | */ |
||
25 | protected function publishConfig() |
||
26 | { |
||
27 | $path = __DIR__.'/../config/disqus.php'; |
||
28 | $this->mergeConfigFrom($path, 'disqus'); |
||
29 | $this->publishes([ |
||
30 | $path => config_path('disqus.php'), |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
31 | ], 'disqus'); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Register disqus middleware. |
||
36 | */ |
||
37 | protected function registerMiddleware() |
||
38 | { |
||
39 | $this->app[Kernel::class]->pushMiddleware( |
||
40 | DisqusMiddleware::class |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Register any application services. |
||
46 | * |
||
47 | * @return void |
||
48 | */ |
||
49 | public function register() |
||
50 | { |
||
51 | // |
||
52 | } |
||
53 | } |
||
54 |