Forum General Multiple Form update
I'm looking for a better way to store multiple forms update. E.g: in one page I have multiple forms each one have a hidden input with its type.
<input type="hidden" name="type" value="type_of_form">
Currently I'm handling it like this:
$type = request('type'); if ($type === 'basic') $this->updateBasic(); if ($type === 'legal') $this->updateLegal(); if ($type === 'address') $this->updateAddress(); if ($type === 'address') $this->updateAddress();
I think this is simple but too long. Is there any simplest way ?
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!
Get Started
Multiple Form update
I'm looking for a better way to store multiple forms update. E.g: in one page I have multiple forms each one have a hidden input with its type.
Currently I'm handling it like this:
I think this is simple but too long. Is there any simplest way ?