/** * Get an instance of the redirector. * * @param string|null $to * @param int $status * @param array $headers * @param bool $secure * @return \Laravel\Lumen\Http\Redirector|\Illuminate\Http\RedirectResponse */ function redirect($to = null, $status = 302, $headers = array(), $secure = null) { $redirector = new Laravel\Lumen\Http\Redirector(Container::getInstance()->make('app')); if (is_null($to)) { return $redirector; } return $redirector->to($to, $status, $headers, $secure); }
/** * Get an instance of the redirector. * * @param string|null $to * @param int $status * @param array $headers * @param bool $secure * @return \Laravel\Lumen\Http\Redirector|\Illuminate\Http\RedirectResponse */ function redirect($to = null, $status = 302, $headers = [], $secure = null) { $redirector = new Laravel\Lumen\Http\Redirector(app()); if (is_null($to)) { return $redirector; } return $redirector->to($to, $status, $headers, $secure); }