/**
  * Create a new Redirect response.
  *
  * @param RedirectInterface $redirect
  * @return \Illuminate\Http\RedirectResponse
  */
 public function create(RedirectInterface $redirect)
 {
     $parameters = array_merge(array_map(function () {
         return null;
     }, array_flip($this->route->parameterNames())), $this->route->parameters());
     return $this->redirector->to($this->parser->parse($redirect->getTo(), $parameters), $redirect->getStatus(), [], $redirect->isSecure());
 }
 /**
  * Create a new Redirect response.
  *
  * @param RedirectInterface $redirect
  * @return \Illuminate\Http\RedirectResponse
  */
 public function create(RedirectInterface $redirect)
 {
     $parameters = array_merge(array_map(function () {
         return null;
     }, array_flip($this->route->parameterNames())), $this->route->parameters());
     if (!starts_with($url = $redirect->getTo(), ['http://', 'https://', '//'])) {
         $url = $this->url->to($redirect->getTo(), [], $redirect->isSecure());
     }
     return $this->redirector->to(rtrim($this->parser->parse($url, $parameters), '/'), $redirect->getStatus());
 }