Back to the Learning

Beep Beep. Subscription Required.

Laracasts is packed full with over 1,500 lessons just like this one.
Sign up to get full access or log in to your account and sit back.

Your Teacher | Jeffrey Way's avatar
Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of my days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida with my wife and two kids.

About This Episode

A common gotcha for beginners revolves around re-using forms. It doesn't feel quite right to copy and paste your model's "create" form into the "edit" page, but you're not sure of any other way. For the "edit" form, a couple of things must be different: the submit button should have unique text, and each input should display the old value from the session or the saved value in the database. So how exactly do we allow for this, without breaking the "create" page?

View the source for this lesson on GitHub.

Thanks so much to Mason for the question. If the rest of you have any questions that could be answered in video-form, tweet your question and add the hash tag, #helpMeLaracasts.

Published on Sep 26th, 2016.

Back to Series Button