@fgn I can think this way:
Here is an example of how you might use the temporarySignedRoute method in a controller to redirect the user to a form after they have submitted it:
public function processForm(Request $request) {
// Process the form data
// ...
// Create a temporary signed route with a lifetime of 5 minutes
$lifetime = new DateInterval('PT5M');
$url = route('form', [], false)->temporarySignedRoute($lifetime);
// Redirect the user to the form with the temporary signed route
return redirect($url);
}
In this example, the processForm method processes the form data and then generates a temporary signed URL for the "form" route, with a lifetime of 5 minutes. The user is then redirected to this URL.
Note that, the route should be defined with ->name('form') and you should pass the third parameter in route function as false, that is route('form', [], false) to not create a new url with a new lifetime.