Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Same Component for Create and Edit Forms

Premium
4:00

The Full Lesson is Only for Premium Members

Want to access all of our courses? (29 h 46 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

VJ
Vasile Jianu ✓ Link copied!

hi i can't get the existing selected values to be displayed in the select2 option field on the edit componet, any tip on how to do that thanks

YR
Yeasin Rahman Siam ✓ Link copied!

Hello Vasile. did you use wire:model on select field..

LS
Luis Scura ✓ Link copied!

And by using a single component for both, how do you handle the flash method to be different depending if the user was created or updated?

LS
Luis Scura ✓ Link copied!

UPDATE: since I am using Livewire 3, I follow this instead and, I still had to create 2 seperate components but using one single form: https://laraveldaily.com/lesson/livewire-3/edit-product-form-object

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.