Skip to content

Commit 71b13b9

Browse files
committed
Remove URL generator dependancy
Better for Lumen
1 parent 4cedec8 commit 71b13b9

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/JavascriptRenderer.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ class JavascriptRenderer extends BaseJavascriptRenderer
1212
// Use XHR handler by default, instead of jQuery
1313
protected $ajaxHandlerBindToJquery = false;
1414
protected $ajaxHandlerBindToXHR = true;
15-
16-
/** @var \Illuminate\Routing\UrlGenerator */
17-
protected $url;
1815

1916
public function __construct(DebugBar $debugBar, $baseUrl = null, $basePath = null)
2017
{
@@ -28,33 +25,30 @@ public function __construct(DebugBar $debugBar, $baseUrl = null, $basePath = nul
2825
* Set the URL Generator
2926
*
3027
* @param \Illuminate\Routing\UrlGenerator $url
28+
* @deprecated
3129
*/
3230
public function setUrlGenerator($url)
3331
{
34-
$this->url = $url;
32+
3533
}
3634

3735
/**
3836
* {@inheritdoc}
3937
*/
4038
public function renderHead()
4139
{
42-
if (!$this->url) {
43-
return parent::renderHead();
44-
}
45-
4640
$jsModified = $this->getModifiedTime('js');
4741
$cssModified = $this->getModifiedTime('css');
4842

4943
$html = '';
5044
$html .= sprintf(
5145
'<link rel="stylesheet" type="text/css" href="%s?%s">' . "\n",
52-
$this->url->route('debugbar.assets.css'),
46+
route('debugbar.assets.css'),
5347
$cssModified
5448
);
5549
$html .= sprintf(
5650
'<script type="text/javascript" src="%s?%s"></script>' . "\n",
57-
$this->url->route('debugbar.assets.js'),
51+
route('debugbar.assets.js'),
5852
$jsModified
5953
);
6054

0 commit comments

Comments
 (0)