Reputation: 5136
Recently, I've encountered with a weird issue. I'm using laravel-4
.
I use blow code to create links in view that refer to route.
{{ HTML::linkRoute($route, $menuLink,'' ,array($status)) }}
As you know:
$route
is the route name.$menuLink
is the text of the link.$status
is an attribute which contains "selected" string or "" (null).The problem is, in every link which I create like this there is a question mark ?
at the end of url. For instance:
http://domain.dev/cp/contents?
.
By the way, when I change the linkRoute
and remove two last parameters, the question mark disappear:
{{ HTML::linkRoute($route, $menuLink) }}
Do you have any idea about this issue?
Upvotes: 1
Views: 690
Reputation: 3389
You should use null
not ''
.
{{ HTML::linkRoute($route, $menuLink, null ,array($status)) }}
Upvotes: 1
Reputation: 970
Try {{ HTML::linkRoute($route, $menuLink, array(), array($status)) }}
or, even better if it accepts it, {{ HTML::linkRoute($route, $menuLink, null, array($status)) }}
.
Upvotes: 1