2๐
โ
Your axios code is
axios.post('/payments', {
params: {
data_from: this.data_from,
data_to: this.data_to
}
})
if you dd($request->all())
in controller you will get below output
array:1 [
"params" => array:2 [
"data_from" => ""
"data_to" => ""
]
]
so to fetch individual like below
$request->params['data_from']
So better pass data in axios like below
axios.post('/payments', {
data_from: this.data_from,
data_to: this.data_to
})
so you can fetch
$request->data_from
๐คJohn Lobo
1๐
Change that
$data_from = $request -> $data_from;
$data_to = $request -> $data_to;
for this
$data_from = $request->data_from;
$data_to = $request->data_to;
๐คXRaspall
Source:stackexchange.com