I am trying to pass two variables to my controller using ajax. There are no errors but the data is null when I get it in the controller.

**Web.php**

```
Route::get('/donate/select-card', 'CardController@chooseCard')->name('select-card');

```

**CardController.php**

```
public function chooseCard()
{
  $from = Input::get("fromAmount");
  // $to = $request->input('toAmount');
  dd($from);
}

```

> 
> 'null' is the output here
> 
> 
> 

**Script.js**

```
fromAmount = $(this).find('p span:nth-child(1)').text().split("₹ ")[1];
toAmount = $(this).find('p span:nth-child(2)').text().split("₹ ")[1];
$.ajax({
  type:'GET',
     url: '/donate/select-card',
     data:  { fromAmount : fromAmount, toAmount : toAmount }
});

```

What I want is to have the fromAmount & toAmount in my controller.

Thanks in advance.

This is the ajax data from network:

[![enter image description here](https://i.stack.imgur.com/gn2ik.png)](https://i.stack.imgur.com/gn2ik.png)