Thursday 28 July 2016

Laravel 4.2 Add get params in URL::action helper function

Hello,

If we want to add get params we need to call function like this:

routes.php

Route::any('test/{id}',  'Controller@index');

blade.php

{{URL::action("Controller@index", array(111, "firstparam" => "aaa"))}}

And result is:
http://www.dummyurl.local/test/111?firstparam=aaa

Best regards,
Iban Cardona.