/** * 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 = array(), $secure = null) { $url = $this->url->to($url, array(), $secure); if (is_null($title) || $title === false) { $title = $url; } return '<a href="' . $url . '"' . $this->attributes($attributes) . '>' . $this->entities($title) . '</a>'; }
/** * Create a new redirect response to the given path. * * @param string $path * @param int $status * @param array $headers * @param bool $secure * @return \Nova\Http\RedirectResponse */ public function to($path, $status = 302, $headers = array(), $secure = null) { $path = $this->generator->to($path, array(), $secure); return $this->createRedirect($path, $status, $headers); }