| 1 | <?php |
||
| 12 | class PageTitleServiceProvider extends ServiceProvider |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Indicates if loading of the provider is deferred. |
||
| 16 | * |
||
| 17 | * @var bool |
||
| 18 | */ |
||
| 19 | protected $defer = false; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Register the service provider. |
||
| 23 | */ |
||
| 24 | public function register() |
||
| 25 | { |
||
| 26 | $this->app->singleton('PageTitle', function () { |
||
| 27 | $delimeter = config('pagetitle.delimiter'); |
||
| 28 | $page_name = config('pagetitle.page_name'); |
||
| 29 | $default = config('pagetitle.default_title_when_empty'); |
||
| 30 | |||
| 31 | return new PageTitle($delimeter, $page_name, $default); |
||
| 32 | }); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function boot() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get the services provided by the provider. |
||
| 45 | * |
||
| 46 | * @return array |
||
| 47 | */ |
||
| 48 | public function provides() |
||
| 52 | } |
||
| 53 |