1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ag84ark\ObjectConvertor; |
4
|
|
|
|
5
|
|
|
use Illuminate\Support\ServiceProvider; |
6
|
|
|
|
7
|
|
|
class ObjectConvertorServiceProvider extends ServiceProvider |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* Bootstrap the application services. |
11
|
|
|
*/ |
12
|
48 |
|
public function boot() |
13
|
|
|
{ |
14
|
|
|
/* |
15
|
|
|
* Optional methods to load your package assets |
16
|
|
|
*/ |
17
|
|
|
// $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'object-convertor'); |
18
|
|
|
// $this->loadViewsFrom(__DIR__.'/../resources/views', 'object-convertor'); |
19
|
|
|
// $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
20
|
|
|
// $this->loadRoutesFrom(__DIR__.'/routes.php'); |
21
|
|
|
|
22
|
48 |
|
if ($this->app->runningInConsole()) { |
23
|
48 |
|
$this->publishes([ |
24
|
48 |
|
__DIR__.'/../config/object-convertor.php' => config_path('object-convertor.php'), |
25
|
48 |
|
], 'config'); |
26
|
|
|
|
27
|
|
|
// Publishing the views. |
28
|
|
|
/*$this->publishes([ |
29
|
|
|
__DIR__.'/../resources/views' => resource_path('views/vendor/object-convertor'), |
30
|
|
|
], 'views');*/ |
31
|
|
|
|
32
|
|
|
// Publishing assets. |
33
|
|
|
/*$this->publishes([ |
34
|
|
|
__DIR__.'/../resources/assets' => public_path('vendor/object-convertor'), |
35
|
|
|
], 'assets');*/ |
36
|
|
|
|
37
|
|
|
// Publishing the translation files. |
38
|
|
|
/*$this->publishes([ |
39
|
|
|
__DIR__.'/../resources/lang' => resource_path('lang/vendor/object-convertor'), |
40
|
|
|
], 'lang');*/ |
41
|
|
|
|
42
|
|
|
// Registering package commands. |
43
|
|
|
// $this->commands([]); |
44
|
|
|
} |
45
|
48 |
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Register the application services. |
49
|
|
|
*/ |
50
|
48 |
|
public function register() |
51
|
|
|
{ |
52
|
|
|
// Automatically apply the package configuration |
53
|
48 |
|
$this->mergeConfigFrom(__DIR__.'/../config/object-convertor.php', 'object-convertor'); |
54
|
|
|
|
55
|
|
|
// Register the main class to use with the facade |
56
|
|
|
//$this->app->singleton('object-convertor', function () { |
57
|
|
|
// return new ObjectConvertor(); |
58
|
|
|
//}); |
59
|
48 |
|
} |
60
|
|
|
} |
61
|
|
|
|