예제 #1
0
 /**
  * Get the action for a "route" option.
  *
  * @param  array|string  $options
  * @return string
  */
 protected function getRouteAction($options)
 {
     if (is_array($options)) {
         return $this->url->route($options[0], array_slice($options, 1));
     }
     return $this->url->route($options);
 }
예제 #2
0
 /**
  * Create a new redirect response to a named route.
  *
  * @param  string  $route
  * @param  array   $parameters
  * @param  int     $status
  * @param  array   $headers
  * @return \Nova\Http\RedirectResponse
  */
 public function route($route, $parameters = array(), $status = 302, $headers = array())
 {
     $path = $this->generator->route($route, $parameters);
     return $this->to($path, $status, $headers);
 }
예제 #3
0
 /**
  * Generate a HTML link to a named route.
  *
  * @param  string  $name
  * @param  string  $title
  * @param  array   $parameters
  * @param  array   $attributes
  * @return string
  */
 public function linkRoute($name, $title = null, $parameters = array(), $attributes = array())
 {
     return $this->link($this->url->route($name, $parameters), $title, $attributes);
 }