Siamak Motlagh
Siamak Motlagh

Reputation: 5136

laravel 4: linkRoute unwanted question mark

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:

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

Answers (2)

Kyle Needham
Kyle Needham

Reputation: 3389

You should use null not ''.

{{ HTML::linkRoute($route, $menuLink, null ,array($status)) }}

Upvotes: 1

Pedro Moreira
Pedro Moreira

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

Related Questions