예제 #1
0
 /**
  * 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);
 }
예제 #2
0
 /**
  * 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>';
 }
예제 #3
0
 /**
  * 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);
 }