Laravel通过数据在另一页上形成

I am attempting to essentially pass a variable from one page url to another to assist in filling out a form.

I have a Script model and a Prescription model. Each script can have multiple prescriptions. So on the Scripts show page, I'm wanting to have a create button that allows users to click it, and it sends them to the Prescriptions create page, but auto-fills out the script_id for the user in the controller. This way it is definitively tagged to the correct script.

So if someone clicks on 'Create Prescription' on test.com/scripts/34/show, it takes them to test.com/prescriptions/create and automatically applies 34 as the script_id field - ideally either a hidden field, or directly passed to the controller somehow so that the user can't tamper with it.

You can use session, before returning prescriptions/create page you can do

Session::flash('script_id', $script_id);

and when user submits prescription creation just take it

$script_id = Session::get('script_id');