8000 Merge pull request #61 from jasonvarga/5.0 · Hydrane/tmp-laravel-framework@e6254b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e6254b2

Browse files
committed
Merge pull request laravel#61 from jasonvarga/5.0
Add full() and current() url methods
2 parents a5789dc + 81a8fed commit e6254b2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Routing/UrlGenerator.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,26 @@ public function __construct(Application $app)
3838
$this->app = $app;
3939
}
4040

41+
/**
42+
* Get the full URL for the current request.
43+
*
44+
* @return string
45+
*/
46+
public function full()
47+
{
48+
return $this->app->make('request')->fullUrl();
49+
}
50+
51+
/**
52+
* Get the current URL for the request.
53+
*
54+
* @return string
55+
*/
56+
public function current()
57+
{
58+
return $this->to($this->app->make('request')->getPathInfo());
59+
}
60+
4161
/**
4262
* Generate a url for the application
4363
*

0 commit comments

Comments
 (0)
0