|
1 | | -<?php namespace Conner\Tagging\Providers; |
2 | | - |
3 | | -use Illuminate\Support\ServiceProvider; |
4 | | -use Conner\Tagging\Contracts\TaggingUtility; |
5 | | -use Conner\Tagging\Util; |
6 | | - |
7 | | -/** |
8 | | - * Copyright (C) 2014 Robert Conner |
9 | | - */ |
10 | | -class TaggingServiceProvider extends ServiceProvider { |
11 | | - |
12 | | - /** |
13 | | - * Indicates if loading of the provider is deferred. |
14 | | - */ |
15 | | - protected $defer = true; |
16 | | - |
17 | | - /** |
18 | | - * Bootstrap the application events. |
19 | | - */ |
20 | | - public function boot() |
21 | | - { |
22 | | - $this->publishes([ |
23 | | - __DIR__.'/../../config/tagging.php' => config_path('tagging.php'), |
24 | | - __DIR__.'/../../migrations/2014_01_07_073615_create_tagged_table.php' => $this->app->databasePath().('/migrations/2014_01_07_073615_create_tagged_table.php'), |
25 | | - __DIR__.'/../../migrations/2014_01_07_073615_create_tags_table.php' => $this->app->databasePath().('/migrations/2014_01_07_073615_create_tags_table.php'), |
26 | | - ]); |
27 | | - } |
28 | | - |
29 | | - /** |
30 | | - * Register the service provider. |
31 | | - * |
32 | | - * @return void |
33 | | - */ |
34 | | - public function register() |
35 | | - { |
36 | | - $this->app->singleton(TaggingUtility::class, function () { |
37 | | - return new Util; |
38 | | - }); |
39 | | - } |
40 | | - |
41 | | - /** |
42 | | - * (non-PHPdoc) |
43 | | - * @see \Illuminate\Support\ServiceProvider::provides() |
44 | | - */ |
45 | | - public function provides() |
46 | | - { |
47 | | - return [TaggingUtility::class]; |
48 | | - } |
49 | | - |
50 | | - /** |
51 | | - * (non-PHPdoc) |
52 | | - * @see \Illuminate\Support\ServiceProvider::when() |
53 | | - */ |
54 | | - public function when() |
55 | | - { |
56 | | - return array('artisan.start'); |
57 | | - } |
58 | | - |
59 | | -} |
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Conner\Tagging\Providers; |
| 4 | + |
| 5 | +use Illuminate\Support\ServiceProvider; |
| 6 | +use Conner\Tagging\Contracts\TaggingUtility; |
| 7 | +use Conner\Tagging\Util; |
| 8 | + |
| 9 | +/** |
| 10 | + * Copyright (C) 2014 Robert Conner |
| 11 | + */ |
| 12 | +class TaggingServiceProvider extends ServiceProvider { |
| 13 | + |
| 14 | + /** |
| 15 | + * Indicates if loading of the provider is deferred. |
| 16 | + */ |
| 17 | + protected $defer = true; |
| 18 | + |
| 19 | + /** |
| 20 | + * Bootstrap the application events. |
| 21 | + */ |
| 22 | + public function boot() |
| 23 | + { |
| 24 | + $this->publishes([ |
| 25 | + __DIR__.'/../config/tagging.php' => config_path('tagging.php') |
| 26 | + ], 'config'); |
| 27 | + |
| 28 | + $this->publishes([ |
| 29 | + __DIR__.'/../migrations/' => database_path('migrations') |
| 30 | + ], 'migrations'); |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * Register the service provider. |
| 35 | + * |
| 36 | + * @return void |
| 37 | + */ |
| 38 | + public function register() |
| 39 | + { |
| 40 | + $this->app->singleton(TaggingUtility::class, function () { |
| 41 | + return new Util; |
| 42 | + }); |
| 43 | + } |
| 44 | + |
| 45 | + /** |
| 46 | + * (non-PHPdoc) |
| 47 | + * @see \Illuminate\Support\ServiceProvider::provides() |
| 48 | + */ |
| 49 | + public function provides() |
| 50 | + { |
| 51 | + return [TaggingUtility::class]; |
| 52 | + } |
| 53 | +} |
0 commit comments