/** * Changing the hostname and port. */ public function testShouldChangeHostnameAndPort4() { lumenUrlHost(['host' => 'example.com', 'port' => '8080']); $this->assertEquals('http://example.com:8080', $this->url->to('/')); lumenUrlHost('localhost:8000'); $this->assertEquals('http://example.com:8080', $this->url->to('/')); }
/** * Get the action for a "url" option. * * @param array|string $options * * @return string */ protected function getUrlAction($options) { if (is_array($options)) { return $this->url->to($options[0], array_slice($options, 1)); } return $this->url->to($options); }
/** * Generate a HTML link. * * @param string $url * @param string $title * @param array $attributes * @param bool $secure * * @return string */ public function link($url, $title = null, $attributes = [], $secure = null) { $url = $this->url->to($url, [], $secure); if (is_null($title) || $title === false) { $title = $url; } return '<a href="' . $url . '"' . $this->attributes($attributes) . '>' . $this->entities($title) . '</a>'; }
/** * Get the fallback callback redirect URL if none provided. * * @param string $callback_url * * @return string */ private function getCallbackUrl($callback_url) { $callback_url = $callback_url ?: $this->config_handler->get('laravel-facebook-sdk.default_redirect_uri'); return $this->url->to($callback_url); }