Support the ongoing development of Laravel.io →
posted 10 years ago
Requests
Last updated 2 years ago.
0

You can use named routes:

Route::get('spiel', array('as' => 'spiel.index', 'uses' => 'SpielController@getIndex'));

//then
$u = URL::route('spiel.index', array(
  'term' => 'termb',
  'link' => 'type'
));

Or just append a query string (looks a bit ugly though):

$params = array('term' => 'termb', 'link' => 'type');
$queryString = http_build_query($params);
$u = URL::to(action('SpielController@getIndex') . '?' . $queryString);
Last updated 2 years ago.
0

why action do not support append params 。。。。。

0

In 4.2, I can easily use this :-

$params = array('term' => 'termb', 'link' => 'type');
$queryString = http_build_query($params);

URL::action('ProfileController@show', '?'.$queryString )

Not sure, about 4.1

0

i got this problem too after update

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.