How to pass post parameters in laravel from the route to the controller?

I’m doing this query in the payment controller and i need to get a post request from the route.

Controller:

class PaymentController extends Controller 
{
    public function apiPaymentByUserId($date_from, $date_to) { 


        $payments = DB::table("casefiles, payments")
            ->select("payments.*")
            ->where("casefiles.id", "=", 'payments.casefile_id')
            ->where("casefiles.user_id", "=", Auth::id())
            ->where("payments.created_at", ">=", $data_from)
            ->where("payments.updated_at", "<=", $data_to)
            ->get();

            
            return response()->json([ 
                'success' => true, 
                'response' => $payments 
            ]);
    
    }
}

Route:

Route::post('/payments/{date_from}/{date_to}', '[email protected]');

How to pass multiple parameters in this post route? Thank you

Answer

For post request no need to pass param in url .You will get in request

So route will be

Route::post('/payments', '[email protected]');

and controller method

public function apiPaymentByUserId(Request $request) 
{ 
    $date_from = $request->date_from;
    $date_to = $request->date_to;
}