How to pass multiple arguments with url (routing) in laravel 5.1


I want to edit my table which having ID and TktID.

I want to pass this two parameters to edit method of my TestController.

My link:

<a href="/sig/edit?id={{$value->id}}&ticketid={{$value->ticketid}}" title="Edit signature">

My route.php


edit method of controller:

 public function edit($id, $ticketid)

How do I pass here two arguments in route.php to controller.

You forget end bracket

You have error in your routes.php file:

Route::get('sig/edit{id}{ticketid}', 'TicketsController@edit');

Should be:

Route::get('sig/edit/{id}/{ticketid}', 'TicketsController@edit');

Notice the forward slash after edit and id.

And in the view it should be either of the following:

<a href="{{ url('sig/edit/ ' . $value->id . '/' . $value->ticketid .')}}" title="Edit signature">


<a href="/sig/edit/{$value->id}/{$value->ticketid}" title="Edit signature">

I hope this helps you out. Cheers.

Laravel Passing Multiple Parameters In Route to Controller, Basic Routing; Route Parameters; Route Filters; Named Routes; Route Groups; Sub-Domain Routing; Route Registering A Route For Multiple Verbs Often, you will need to generate URLs to your routes, you may do so using the URL::to method: Of course, you may pass an array of constraints when necessary: Basic Routing. The most basic Laravel routes accept a accessed by entering the defined route's URL in your array of data to pass to the view as an optional

 <a class="getValues" href="/sig/edit" title="Edit signature"/>Edit</a>
    <input type="hidden" id="id" name="id" value"={{$value->id}}"/>
    <input type="hidden" id="ticketid" name="ticketid" value="{{$value->ticketid}}"/>

     var $id=jQuery('#id').val();
     var $ticketid=jQuery('#ticketid').val();


paste this line of code as first line in your controller's function ...

$inputs = Input::all();

and get values of input like

echo    $ticketid=$inputs['ticketid'];
 echo "<br/>";
 echo     $id=$inputs['id'];

HTTP Routing - Laravel, laravel 5.4 passing two parameters to route error. Posted 3 years ago by xuuto. i have this route. Route::get('/artist/{id}/{name}',  Laravel 5.1 doesn't allow you to pass in url params (is there configuration) Ask Question How to pass multiple arguments with url (routing) in laravel 5.1. 1.




<a href="{{route('sig.edit',[$value->id,$value->ticketid])}}" title="Edit signature">

Routing - Laravel, How can pass multiple values from controller view in laravel? Teams. Q&A for Work. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information.

I found this way to keep your URL the same way and access multiple parameters

<a href="/sig/edit?id={{$value->id}}&ticketid={{$value->ticketid}}" title="Edit signature">


Route::get('sig/edit', 'TicketsController@edit');

Access the parameter values in the controller


public function edit(){
$id = Input::get('id');
$ticketId = Input::get('ticketid');

Note: import Input in controller

use Illuminate\Support\Facades\Input;

laravel 5.4 passing two parameters to route error, each route in the group with a given URI. These URLs have a "signature" hash appended to the query string which allows Laravel to verify that the URL has not been modified since it was created. Signed URLs are especially useful for routes that are publicly accessible yet need a layer of protection against URL manipulation.

in routes/web.php file - This one works for me.

Route::any('/documents/folder/{args?}', function($args){
   $args = explode('/', $args);
   return $args;
})->where('args', '(.*)');

It should handle every argument/parameter now.

Hope it works !

Routing with Multiple Parameters using ASP.NET MVC, This parameter is used when we rigidly want a route to provide some arguments. The idea is to store {username} which is passed as an argument in URL and store it in variable $username to process further and So here's how you can pass missing parameters in Laravel blade files: Khushi Shah March 5, 2018  Helpers. Introduction; Available Methods; Introduction. Laravel includes a variety of global "helper" PHP functions. Many of these functions are used by the framework itself; however, you are free to use them in your own applications if you find them convenient.

Laravel - Pass more than one variable to view, Default Route files. 5. This means that all Learn how to use filters to control Laravel 6 in You can url in pass parameters if you get parameters value then use​  composer require laravel/slack-notification-channel. You will also need to configure an "Incoming Webhook" integration for your Slack team. This integration will provide you with a URL you may use when routing Slack notifications. Formatting Slack Notifications

Laravel 5 routing using prefix, laravel pass multiple variables to controller how to pass parameter in url in laravel 5 laravel route 2 parameters laravel pass parameter to controller laravel  Basic Routing. The most basic Laravel routes accept a URI and a Closure, providing a very simple and expressive method of defining routes: Route::get('foo', function { return 'Hello World'; }); The Default Route Files. All Laravel routes are defined in your route files, which are located in the routes directory. These files are automatically

How to Use Parameters in Laravel Routes, Access Laravel route parameters using middleware. A route usually has the URL path, and a handler function callback, which is usually a For instance, to pass in a name parameter to a route, it would look like this. The routing mechanism is shown in the image given below − Let us now understand the steps involved in routing mechanism in detail − Step 1 − Initially, we should execute the root URL of the application. Step 2 − Now, the executed URL should match with the appropriate method in the route.php file. In the present case, it should match the

  • ok how about calling from broswer ip/sig/edit/ree will it work ?
  • There is no form to submit. Can this two hidden field will be submitted on clicking URL?
  • @martin now try this one it will work without having a form to submit