33use Illuminate \Support \ServiceProvider ;
44use Illuminate \View \Engines \CompilerEngine ;
55
6- class DbBladeCompilerServiceProvider extends ServiceProvider {
6+ class DbBladeCompilerServiceProvider extends ServiceProvider
7+ {
78
8- /**
9- * Indicates if loading of the provider is deferred.
10- *
11- * @var bool
12- */
13- protected $ defer = false ;
9+ /**
10+ * Indicates if loading of the provider is deferred.
11+ *
12+ * @var bool
13+ */
14+ protected $ defer = false ;
1415
15- /**
16- * Bootstrap the application events.
17- *
18- * @return void
19- */
20- public function boot ()
21- {
22- $ config_path = __DIR__ . '/../../../config/db-blade-compiler.php ' ;
23- $ this ->publishes ([$ config_path => config_path ('db-blade-compiler.php ' )], 'config ' );
16+ /**
17+ * Bootstrap the application events.
18+ *
19+ * @return void
20+ */
21+ public function boot ()
22+ {
23+ $ config_path = __DIR__ . '/../../../config/db-blade-compiler.php ' ;
24+ $ this ->publishes ([$ config_path => config_path ('db-blade-compiler.php ' )], 'config ' );
2425
25- $ views_path = __DIR__ . '/../../../config/.gitkeep ' ;
26- $ this ->publishes ([$ views_path => storage_path ('app/db-blade-compiler/views/.gitkeep ' )]);
27- }
26+ $ views_path = __DIR__ . '/../../../config/.gitkeep ' ;
27+ $ this ->publishes ([$ views_path => storage_path ('app/db-blade-compiler/views/.gitkeep ' )]);
28+ }
2829
29- /**
30- * Register the service provider.
31- *
32- * @return void
33- */
34- public function register ()
35- {
36- $ config_path = __DIR__ . '/../../../config/db-blade-compiler.php ' ;
37- $ this ->mergeConfigFrom ($ config_path , 'db-blade-compiler ' );
30+ /**
31+ * Register the service provider.
32+ *
33+ * @return void
34+ */
35+ public function register ()
36+ {
37+ $ config_path = __DIR__ . '/../../../config/db-blade-compiler.php ' ;
38+ $ this ->mergeConfigFrom ($ config_path , 'db-blade-compiler ' );
3839
39- $ this ->app ['dbview ' ] = $ this ->app ->share (function ($ app )
40- {
41- $ cache_path = storage_path ('app/db-blade-compiler/views ' );
40+ $ this ->app ['dbview ' ] = $ this ->app ->share (function ($ app ) {
41+ $ cache_path = storage_path ('app/db-blade-compiler/views ' );
4242
43- $ db_view = new DbView ($ app ['config ' ]);
44- $ compiler = new DbBladeCompiler ($ app ['files ' ], $ cache_path , $ app ['config ' ], $ app );
45- $ db_view ->setEngine (new CompilerEngine ($ compiler ));
43+ $ db_view = new DbView ($ app ['config ' ]);
44+ $ compiler = new DbBladeCompiler ($ app ['files ' ], $ cache_path , $ app ['config ' ], $ app );
45+ $ db_view ->setEngine (new CompilerEngine ($ compiler ));
4646
47- return $ db_view ;
47+ return $ db_view ;
4848 });
49- $ this ->app ->booting (function ()
50- {
51- $ loader = \Illuminate \Foundation \AliasLoader::getInstance ();
52- $ loader ->alias ('DbView ' , 'Flynsarmy\DbBladeCompiler\Facades\DbView ' );
49+ $ this ->app ->booting (function () {
50+ $ loader = \Illuminate \Foundation \AliasLoader::getInstance ();
51+ $ loader ->alias ('DbView ' , 'Flynsarmy\DbBladeCompiler\Facades\DbView ' );
5352 });
54- }
53+ }
5554
56- /**
57- * Get the services provided by the provider.
58- *
59- * @return array
60- */
61- public function provides ()
62- {
63- return array ();
64- }
55+ /**
56+ * Get the services provided by the provider.
57+ *
58+ * @return array
59+ */
60+ public function provides ()
61+ {
62+ return array ();
63+ }
6564
6665}
0 commit comments