Livewire: Same Component for Create and Edit Forms

  Рет қаралды 17,358

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер: 27
@riccardotassinari2929
@riccardotassinari2929 Жыл бұрын
The mount parameter can be used for 3 different purposes: - passing a numerical id: the mount load the model with the given Id (edit mode) - passing an array: the mount initializes a new model with the given data (create mode with fields preset) - passing null: a new empty model is initialized
@samiullah0011
@samiullah0011 Жыл бұрын
how to redirect to create or update component should it requires route?
@AnwarBarakatDev
@AnwarBarakatDev Жыл бұрын
Hello sir. This was perfect as for my current project. but after add or edit a new product I want to empty the form , i use $this->unset('product'); but shows me this error $product must not be accesses before initilized. although I passed it in mount method public function mount(Product $product){ $this->product = $product; }
@Zirwahkrillz
@Zirwahkrillz Жыл бұрын
First one here. This is perfect as for my next project I want to forego Javascript and try Livewire fullout
@salaheddinebendyab
@salaheddinebendyab Жыл бұрын
There is a problem if i have a unique item in validation ?
@LaravelDaily
@LaravelDaily Жыл бұрын
You have to describe it differently for create and edit then, yes
@gijsbijvoets3446
@gijsbijvoets3446 Жыл бұрын
Is there a way to do this with livewire V3 and the new FormObjects?
@LaravelDaily
@LaravelDaily Жыл бұрын
Yes it is possible, I'm working on a course about it, should launch next week.
@DGINX96
@DGINX96 8 ай бұрын
@@LaravelDaily Hi! is this course already created? I need a tutorial for V3
@yungifez
@yungifez Жыл бұрын
Hey Povilas, I'm a pure livewire fan, but I'd love to ask if it would be able to manage around 10k concurrent users I've been assigned to create a new project
@LaravelDaily
@LaravelDaily Жыл бұрын
I haven't tried this volume
@yungifez
@yungifez Жыл бұрын
@@LaravelDaily oh thank you
@dodyginandjar
@dodyginandjar Жыл бұрын
Hai Povilas, i am a fan of livewire . I always create crud using full page component with modal for create and edit. But I have problem with datepicker in modal. I hope you make tutorial about solving it. So far , I create non-modal form if the crud need datepicker.
@LaravelDaily
@LaravelDaily Жыл бұрын
I would use general date picker from HTML: input type="date"
@elmarzougui
@elmarzougui Жыл бұрын
and add this style for css file or Style tag : .datepicker { z-index: 1600 !important; /* has to be larger than 1050 */ }
@elmarzougui
@elmarzougui Жыл бұрын
you can add this event inside input : onchange="this.dispatchEvent(new InputEvent('input'))"
@2509killer
@2509killer Жыл бұрын
the works great on modal
@dodyginandjar
@dodyginandjar Жыл бұрын
@@LaravelDaily , it's mean livewire still have a homework to fix data binding for datepicker in modal isn't it.
@ilhampamungkas5716
@ilhampamungkas5716 Жыл бұрын
Its spa ? No refresh sir ?
@LaravelDaily
@LaravelDaily Жыл бұрын
Yes you can call it a SPA.
@andistheinforitbutso7513
@andistheinforitbutso7513 10 ай бұрын
@khizer3528
@khizer3528 Жыл бұрын
Useful
@jfrosorio
@jfrosorio Жыл бұрын
What if you need to stay on the same page after creating a Product? How do you reset it? I'm sorry, but for me, this lesson is not 100% accurate. If you inject the model into the mount method, you cannot reset it later. In this case, the problem goes unnoticed, as the user is being redirected to another page after creating the Product.
Why Flux Livewire UI is the BEST choice for Laravel Developers
22:17
I build a TODO list app with Laravel in 17 minutes.
17:58
Josh Cirre
Рет қаралды 7 М.
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН
Is Laravel Livewire actually secure?
8:19
Josh Cirre
Рет қаралды 10 М.
Faster Eloquent: Avoid Accessors with Foreach
9:35
Laravel Daily
Рет қаралды 54 М.
[Live-coding] Laravel Livewire: Parent-Child Form Example
17:08
Laravel Daily
Рет қаралды 90 М.
We Love PHP Attributes
10:02
Laravel
Рет қаралды 13 М.
The Laravel Ecosystem - Livewire 🐙
7:07
Laravel
Рет қаралды 13 М.
Filament Tables with Livewire: Full Page Component! ✨
22:45
The Laravel Ecosystem - Volt ⚡
6:09
Laravel
Рет қаралды 10 М.
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН