1 <?php
2
3 namespace Skimia\Assets;
4
5 use Illuminate\Support\ServiceProvider;
6 use Skimia\Assets\Console\Commands\DumpCollectionsCommand;
7 use Skimia\Assets\Scanner\ScannerServiceProvider;
8 use Skimia\Assets\Providers\StolzAssetsServiceProvider;
9
10 class AssetsServiceProvider extends ServiceProvider
11 {
12 13 14
15 public function register()
16 {
17 $this->app->register(StolzAssetsServiceProvider::class);
18 $this->app->register(ScannerServiceProvider::class);
19
20
21 $this->app->bind('skimia.assets.command.dump', function ($app) {
22 return new DumpCollectionsCommand();
23 });
24 }
25
26 public function boot()
27 {
28 $this->publishes([
29 __DIR__.'/config.php' => config_path('assets.php'),
30 ]);
31
32
33 $this->mergeConfigFrom(__DIR__.'/config.php', 'assets');
34
35 $this->commands('skimia.assets.command.dump');
36
37 if ($this->app['config']->get('assets.file_prediction', false) === true) {
38 throw new \InvalidArgumentException('the configuration value `assets.file_prediction` must be false this functionality is not implemented');
39 }
40 }
41 }
42