full() public method

Get the full URL for the current request.
public full ( ) : string
return string
 /**
  * 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;
 }
Beispiel #2
0
 /**
  * Get the full URL for the current request.
  *
  * @return string 
  * @static 
  */
 public static function full()
 {
     return \Illuminate\Routing\UrlGenerator::full();
 }
Beispiel #3
0
 /**
  * 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);
 }
Beispiel #4
0
 /**
  * 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());
 }
Beispiel #5
0
 /**
  * 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');
 }