1 | <?php |
||
2 | |||
3 | namespace Deligoez\TCKimlikNo; |
||
4 | |||
5 | use Illuminate\Support\ServiceProvider; |
||
6 | |||
7 | class TCKimlikNoServiceProvider extends ServiceProvider |
||
8 | { |
||
9 | /** |
||
10 | * Perform post-registration booting of services. |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function boot() |
||
15 | { |
||
16 | // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deligoez'); |
||
17 | // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deligoez'); |
||
18 | // $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
||
19 | // $this->loadRoutesFrom(__DIR__.'/routes.php'); |
||
20 | |||
21 | // Publishing is only necessary when using the CLI. |
||
22 | if ($this->app->runningInConsole()) { |
||
23 | $this->bootForConsole(); |
||
24 | } |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Console-specific booting. |
||
29 | * |
||
30 | * @return void |
||
31 | */ |
||
32 | protected function bootForConsole() |
||
33 | { |
||
34 | // Publishing the configuration file. |
||
35 | $this->publishes([ |
||
36 | __DIR__.'/../config/tckimlikno.php' => config_path('tckimlikno.php'), |
||
37 | ], 'tckimlikno.config'); |
||
38 | |||
39 | // Publishing the views. |
||
40 | /*$this->publishes([ |
||
41 | __DIR__.'/../resources/views' => base_path('resources/views/vendor/deligoez'), |
||
42 | ], 'tckimlikno.views');*/ |
||
43 | |||
44 | // Publishing assets. |
||
45 | /*$this->publishes([ |
||
46 | __DIR__.'/../resources/assets' => public_path('vendor/deligoez'), |
||
47 | ], 'tckimlikno.views');*/ |
||
48 | |||
49 | // Publishing the translation files. |
||
50 | /*$this->publishes([ |
||
51 | __DIR__.'/../resources/lang' => resource_path('lang/vendor/deligoez'), |
||
52 | ], 'tckimlikno.views');*/ |
||
53 | |||
54 | // Registering package commands. |
||
55 | // $this->commands([]); |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Register any package services. |
||
60 | * |
||
61 | * @return void |
||
62 | */ |
||
63 | public function register() |
||
64 | { |
||
65 | $this->mergeConfigFrom(__DIR__.'/../config/tckimlikno.php', 'tckimlikno'); |
||
66 | |||
67 | // Register the service the package provides. |
||
68 | $this->app->singleton('tckimlikno', function ($app) { |
||
0 ignored issues
–
show
|
|||
69 | return new TCKimlikNo; |
||
70 | }); |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * Get the services provided by the provider. |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | public function provides() |
||
79 | { |
||
80 | return ['tckimlikno']; |
||
81 | } |
||
82 | } |
||
83 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.