Livewire 3 Validation: Form Objects, Attributes, and Rules

  Рет қаралды 6,978

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер: 23
@nikolicvladimir
@nikolicvladimir 3 күн бұрын
Love you man :) just was looking for validation of multiple file upload and here you are :) See you in 2 weeks !
@ermanarif3176
@ermanarif3176 4 ай бұрын
Hi, i am from Indonesia. I want to ask... Can I use the updated hook from within a form object?
@samiullah0011
@samiullah0011 Жыл бұрын
Thanks for making video on my question.😍
@KasimSheyi
@KasimSheyi Жыл бұрын
Great explanation… i will prefer the form objects over the PHP attribute in cases like this.
@rafp8778
@rafp8778 Жыл бұрын
Fantastic explanation. Thank you.
@LamineAyobaGueye-s7l
@LamineAyobaGueye-s7l Жыл бұрын
hi I have a laravel project with livewire but every time I download a file the formuaire disappears
@JamesAutoDude
@JamesAutoDude 25 күн бұрын
Shouldnt the rules function be private? Can someone edit that somehow if its public function?
@codewithyohatube
@codewithyohatube Жыл бұрын
Hi! thanks for you time make those amazing videos and i have some question pls help me I'm working laravel livewire project and i wanna run livewire in xampp but it wont work tried a lot watch a lot of tutorials but i cant find any solution
@LaravelDaily
@LaravelDaily Жыл бұрын
I don't work with xampp so can't comment, sorry
@saeeedkhan
@saeeedkhan Жыл бұрын
form objects in livewire tests?
@LaravelDaily
@LaravelDaily Жыл бұрын
Haven't tried
@mahmoud-bakheet
@mahmoud-bakheet Жыл бұрын
The both last 2 ways are very impressive especially the last one when you have large project With API and web routes and you need to use the same functionality , Then I don't mind about repeating "data" even I can name it anything useful
@JohnnyBigodes
@JohnnyBigodes Жыл бұрын
The Problem with Attributes is because you cant inject your own data. So it is better to use the rules() method to do this instead. Povilas talked about using the rules() method for complex rules, but I think with "complex" he meant using and injecting your own data. It doesnt mean this has to be complex. 👍
@wevertonlotosport
@wevertonlotosport Жыл бұрын
im thinking in this way too
@mahmoud-bakheet
@mahmoud-bakheet Жыл бұрын
yeah ...
@SussanRai
@SussanRai Жыл бұрын
I think laravel should have default request form feature support like livewire for non livewire user.
@bw7868
@bw7868 Жыл бұрын
Thank you, and I think the best option to use something like Spatie laravel-data package. So you define everything in one placee "data objects", then use them whenever you need anywhere. Also this package supports livewire wireable out of the box, also this make the package a great option.
@LaravelDaily
@LaravelDaily Жыл бұрын
Personally, it never sticks to me - those data objects or value objects are, yeah, "single place to define everything", but to me it feels too DEEP in the code. So I need to always search where that logic is defined. Also, it's tricky if the logic is "a little different" in various forms/validation. Do you have any open-source project where that Spatie laravel-data would be used for a longer form like in this video?
@mahmoud-bakheet
@mahmoud-bakheet Жыл бұрын
I think for the team there are no need to be deep like that because we have a lot of things else to focus on this is the solution I prefer, But I like the idea of Spatie laravel-data
@gymgymy
@gymgymy Жыл бұрын
Yeah, we used Spatie Data in big forms, and it becomes pretty easy to handle once you get used to it. Moreover, we used the same Data object from receiving data from a 3rd-party API, then in Livewire components with user forms, in any other actions and services where we use this Model, and also sent it back to the API. One Data object in the entire model lifecycle. It's also quite nice in testing.
What Senior Devs ACTUALLY Do? (And how to become one)
7:12
Laravel Daily
Рет қаралды 561
Laravel Service Providers: All You Need to Know
13:13
Laravel Daily
Рет қаралды 69 М.
УЛИЧНЫЕ МУЗЫКАНТЫ В СОЧИ 🤘🏻
0:33
РОК ЗАВОД
Рет қаралды 7 МЛН
OCCUPIED #shortssprintbrasil
0:37
Natan por Aí
Рет қаралды 131 МЛН
Form Objects | Laravel Livewire 3 for Beginners EP16
8:37
Yelo Code
Рет қаралды 10 М.
Laravel: Avoid Try-Catch In Every Method (What To Do Instead)
4:45
Laravel Daily
Рет қаралды 37 М.
Laravel's New Strict Mode (Everything You Need to Know)
11:19
Laracasts
Рет қаралды 32 М.
Lifecycle hooks | Laravel Livewire 3 for Beginners EP22
6:57
Laravel CRUD: Multiple Update Forms - Separate Controllers?
7:48
Laravel Daily
Рет қаралды 2,9 М.
Data Transfer Objects - What Are DTOs - Full PHP 8 Tutorial
13:03
Program With Gio
Рет қаралды 43 М.
Form Object - Laravel Livewire v3 Tutorial #episode 8
13:54
Tony Xhepa
Рет қаралды 2,6 М.
УЛИЧНЫЕ МУЗЫКАНТЫ В СОЧИ 🤘🏻
0:33
РОК ЗАВОД
Рет қаралды 7 МЛН