/** * Register the service provider. * * @return void */ public function register() { $this->package('vespakoen/menu', null, __DIR__ . '/../'); $container = Menu::getContainer(); $container['url'] = $this->app['url']; $container['config'] = $this->app['config']; Menu::setContainer($container); }
/** * Register the service provider. * * @return void */ public function register() { $configPath = __DIR__ . '/../config/config.php'; $this->mergeConfigFrom($configPath, 'menu'); $container = Menu::getContainer(); $container['url'] = $this->app['url']; $container['config'] = $this->app['config']; Menu::setContainer($container); }
/** * Get the Request instance * * @return Request */ public function getRequest() { return Menu::getContainer('request'); }
/** * Render the Link * * @return string */ public function render() { $this->href = $this->getEvaluatedUrl(); // Don't compote URL if special URL if (!$this->isSpecialUrl()) { $this->href = Menu::getContainer()->bound('url') ? Menu::getContainer('url')->to($this->href) : $this->href; } return parent::render(); }