Overview
  • Namespace
  • Class

Namespaces

  • CupOfTea
    • EasyCfg
      • Contracts
      • Exceptions
      • Facades
  • None

Classes

  • CupOfTea\EasyCfg\Compiler
  • CupOfTea\EasyCfg\EasyCfg
  • CupOfTea\EasyCfg\EasyCfgServiceProvider
  • CupOfTea\EasyCfg\Facades\Cfg

Interfaces

  • CupOfTea\EasyCfg\Contracts\Provider

Traits

  • CupOfTea\EasyCfg\Configurable

Exceptions

  • CupOfTea\EasyCfg\Exceptions\InvalidKeyException

Functions

  • cfg
 1 <?php namespace CupOfTea\EasyCfg;
 2 
 3 use Blade;
 4 
 5 use CupOfTea\EasyCfg\Contracts\Provider as ProviderContract;
 6 
 7 use Illuminate\Support\ServiceProvider;
 8 
 9 class EasyCfgServiceProvider extends ServiceProvider
10 {
11     
12     /**
13      * Indicates if loading of the provider is deferred.
14      *
15      * @var bool
16      */
17     protected $defer = false;
18     
19     /**
20      * Bootstrap the application events.
21      *
22      * @return void
23      */
24     public function boot()
25     {
26         $this->publishes([
27             __DIR__.'/../database/migrations/' => base_path('/database/migrations')
28         ], 'migrations');
29         
30         $this->publishes([
31             __DIR__.'/../config/easycfg.php' => config_path('easycfg.php'),
32         ], 'config');
33         
34         Blade::extend([with(new Compiler), 'compile']);
35     }
36     
37     /**
38      * Register the service provider.
39      *
40      * @return void
41      */
42     public function register()
43     {
44         $this->mergeConfigFrom(
45             __DIR__.'/../config/easycfg.php', 'easycfg'
46         );
47         
48         $this->app->singleton(ProviderContract::class, EasyCfg::class);
49     }
50     
51     /**
52      * Get the services provided by the provider.
53      *
54      * @return array
55      */
56     public function provides()
57     {
58         return [
59             ProviderContract::class,
60         ];
61     }
62     
63 }
64 
API documentation generated by ApiGen