本文整理汇总了PHP中Illuminate\Routing\UrlGenerator::getRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP UrlGenerator::getRequest方法的具体用法?PHP UrlGenerator::getRequest怎么用?PHP UrlGenerator::getRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Routing\UrlGenerator
的用法示例。
在下文中一共展示了UrlGenerator::getRequest方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createRedirect
/**
* Create a new redirect response.
*
* @param string $path
* @param int $status
* @param array $headers
* @return \Illuminate\Http\RedirectResponse
*/
protected function createRedirect($path, $status, $headers)
{
$redirect = new RedirectResponse($path, $status, $headers);
if (isset($this->session)) {
$redirect->setSession($this->session);
}
$redirect->setRequest($this->generator->getRequest());
return $redirect;
}
示例2: getRequest
/**
* Get the request instance.
*
* @return \Illuminate\Http\Request
* @static
*/
public static function getRequest()
{
return \Illuminate\Routing\UrlGenerator::getRequest();
}
示例3: refresh
/**
* Create a new redirect response to the current URI.
*
* @param int $status
* @param array $headers
* @return \Illuminate\Http\RedirectResponse
*/
public function refresh($status = 302, $headers = array())
{
return $this->to($this->generator->getRequest()->path(), $status, $headers);
}
示例4: createRedirect
/**
* Create a new redirect response.
*
* @param string $path
* @param int $status
* @param array $headers
* @return \Illuminate\Http\RedirectResponse
*/
protected function createRedirect($path, $status, $headers)
{
$redirect = new base_http_response_redirect($path, $status, $headers);
$redirect->setRequest($this->generator->getRequest());
return $redirect;
}
示例5: action
/**
* Determine the appropriate action parameter to use for a form.
*
* If no action is specified, the current request URI will be used.
*
* @param string $action
* @param bool $https
* @return string
*/
protected function action($action, $https)
{
$uri = is_null($action) ? $this->url->getRequest()->path() : $action;
return $this->html->entities($this->url->to($uri, array(), $https));
}