1: <?php
2:
3: namespace rsanchez\Deep\App\Laravel;
4:
5: use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
6: use Illuminate\Foundation\AliasLoader;
7: use rsanchez\Deep\Deep;
8:
9: class ServiceProvider extends LaravelServiceProvider
10: {
11: 12: 13:
14: public function register()
15: {
16: $this->app->singleton('deep', function () {
17: return new Deep();
18: });
19:
20: $this->app->singleton('deep.entry', function ($app) {
21: return $app->make('deep')->make('Entry');
22: });
23:
24: $this->app->singleton('deep.title', function ($app) {
25: return $app->make('deep')->make('Title');
26: });
27:
28: $this->app->singleton('deep.category', function ($app) {
29: return $app->make('deep')->make('Category');
30: });
31: }
32:
33: 34: 35:
36: public function boot()
37: {
38:
39: $loader = AliasLoader::getInstance();
40: $loader->alias('Entries', 'rsanchez\Deep\App\Laravel\Facade\Entries');
41: $loader->alias('Titles', 'rsanchez\Deep\App\Laravel\Facade\Titles');
42: $loader->alias('Categories', 'rsanchez\Deep\App\Laravel\Facade\Categories');
43: }
44: }
45: