本文整理汇总了PHP中Illuminate\Routing\UrlGenerator::full方法的典型用法代码示例。如果您正苦于以下问题:PHP UrlGenerator::full方法的具体用法?PHP UrlGenerator::full怎么用?PHP UrlGenerator::full使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Routing\UrlGenerator
的用法示例。
在下文中一共展示了UrlGenerator::full方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isPage
/**
* Return true if current page is $page.
*/
public function isPage(string $page, array $parameters = []) : bool
{
// Check if $page is a route name
if ($this->route->has($page)) {
if ($parameters) {
return $this->url->current() == $this->url->route($page, $parameters);
}
return $this->route->currentRouteName() == $page;
}
return str_replace($this->request->root() . '/', '', $this->url->full()) == $page;
}
示例2: full
/**
* Get the full URL for the current request.
*
* @return string
* @static
*/
public static function full()
{
return \Illuminate\Routing\UrlGenerator::full();
}
示例3: guest
/**
* Create a new redirect response, while putting the current URL in the session.
*
* @param string $path
* @param int $status
* @param array $headers
* @param bool $secure
* @return \Illuminate\Http\RedirectResponse
*/
public function guest($path, $status = 302, $headers = [], $secure = null)
{
$this->session->put('url.intended', $this->generator->full());
return $this->to($path, $status, $headers, $secure);
}
示例4: createSelfLink
/**
* Creates self links to the currently called Resource with, or without the provided Query Strings.
*
* @param bool $withQueryStrings Decides if Query Strings should be attached as well, or not
* @return array
*/
public function createSelfLink($withQueryStrings = false)
{
return $this->createLink('self', $withQueryStrings ? $this->url->full() : $this->request->url());
}
示例5: redirect
/**
* When a filter is triggered, this method saves the intended URL to
* the lock and returns a redirect to the lock login URL.
*
* @return Illuminate\Http\RedirectResponse
*/
protected function redirect()
{
$this->lock->setIntended($this->url->full());
return $this->redirector->route('l4-lock.login');
}