Passing variables to Form::open(['action' => ['[email protected]', $id_variable_here]])

Posted 8 months ago by ochirach


Laravel 5.4

Is it possible to pass data to the form parameter from Javascript?

I have a users table with edit/remove buttons for each user. Using Bootstrap Modals, a users information can be edited using the form that is present on the Modal.

I need to pass this via the $id required by the update method in the controller.

Each time a different user is to be edited/removed, this variable will be updated to the user selected.

Note: I already got every other requirement working; just need the id to be passed dynamically

Form::open(['action' => ['[email protected]', $id_variable_here]])

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.