Livewire 3 Validation: Form Objects, Attributes, and Rules

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

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер: 21
@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.
@ermanarif3176
@ermanarif3176 2 ай бұрын
Hi, i am from Indonesia. I want to ask... Can I use the updated hook from within a form object?
@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
@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
@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
@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 ...
@saeeedkhan
@saeeedkhan Жыл бұрын
form objects in livewire tests?
@LaravelDaily
@LaravelDaily Жыл бұрын
Haven't tried
@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.
Laravel Code Review: Why NOT Use Repository Pattern?
14:21
Laravel Daily
Рет қаралды 79 М.
Laravel Service Providers: All You Need to Know
13:13
Laravel Daily
Рет қаралды 68 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 154 МЛН
Подсадим людей на ставки | ЖБ | 3 серия | Сериал 2024
20:00
ПАЦАНСКИЕ ИСТОРИИ
Рет қаралды 601 М.
RAGチャットの全体説明
4:15
原田和則(Kazunori Harada)
Рет қаралды 40
Laravel: Avoid Try-Catch In Every Method (What To Do Instead)
4:45
Laravel Daily
Рет қаралды 35 М.
What if You Can't Find a Dev Job for MONTHS?..
8:45
Laravel Daily
Рет қаралды 4,2 М.
Laravel Reverb : Getting started
30:26
Code with Burt
Рет қаралды 11 М.
4 Tips for Dev Productivity (I've tried many techniques...)
9:01
Laravel Daily
Рет қаралды 4,4 М.
File Upload in Laravel: Main Things You Need To Know
13:58
Laravel Daily
Рет қаралды 26 М.