Overview

Namespaces

  • Menu
    • Items
      • Contents
    • Traits

Classes

  • Menu\Items\Contents\Link
  • Menu\Items\Contents\Raw
  • Menu\Items\Item
  • Menu\Items\ItemList
  • Menu\Menu
  • Menu\MenuHandler
  • Menu\MenuServiceProvider
  • Menu\Traits\Content
  • Menu\Traits\MenuObject
  • Overview
  • Namespace
  • Class
 1: <?php
 2: namespace Menu;
 3: 
 4: use Illuminate\Support\ServiceProvider;
 5: 
 6: /**
 7:  * The "start" file for laravel
 8:  */
 9: class MenuServiceProvider 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:    * Register the service provider.
21:    *
22:    * @return void
23:    */
24:   public function register()
25:   {
26:     $configPath = __DIR__ . '/../config/config.php';
27:     $this->mergeConfigFrom($configPath, 'menu');
28: 
29:     $container = Menu::getContainer();
30:     $container['url'] = $this->app['url'];
31:     $container['config'] = $this->app['config'];
32:     Menu::setContainer($container);
33:   }
34: 
35:   /**
36:    * Get the services provided by the provider.
37:    *
38:    * @return array
39:    */
40:   public function provides()
41:   {
42:     return array('menu');
43:   }
44: 
45:   /**
46:    * Declare publishable assets
47:    *
48:    * @return void
49:    */
50:   public function boot()
51:   {
52:         $configPath = __DIR__ . '/../config/config.php';
53:         $this->publishes([$configPath => config_path('menu.php')], 'config');
54:   }
55: }
56: 
API documentation generated by ApiGen