The most powerful way to use Eloquent

  Рет қаралды 5,031

Mateus Guimarães

Mateus Guimarães

Күн бұрын

Пікірлер: 29
@nexxai
@nexxai 5 ай бұрын
Wow. This is awesome! It makes so much sense regarding consistency and I think I'm going to be spending some time over the next week bringing it into my latest side project. Thanks for doing this!
5 ай бұрын
Let me know what you think!
@DaviMartins99
@DaviMartins99 5 ай бұрын
I wish that Taylor left you some feedback on why not merging this instead of just closing with the auto message, guess it was because it's pretty big change to the Eloquent-way of thinking. Great idea for a package nevertheless, can see myself pulling this if the right scenario comes up.
5 ай бұрын
I think it was a fair response! Eloquent is very complex and it’s a critical piece, so I understand that changing how it behaves is complicated.
@piter33
@piter33 5 ай бұрын
Great idea, Mateus! I'll try it. I think this is worth a PR in Laravel 😉
5 ай бұрын
The package came from a PR! :-) github.com/laravel/framework/pull/48914
@mahdibouguerzi
@mahdibouguerzi 4 ай бұрын
Great video 👍 ! but what will i miss if i used DB::transaction ?
4 ай бұрын
You’d have to save each “piece” of the aggregate as separate entities, individually
@the-code-reviewer
@the-code-reviewer 5 ай бұрын
Great Doctrine idea :)
@inspiway6424
@inspiway6424 5 ай бұрын
Nice, I had no idea about that "persist" method. Thx!
@criley7755
@criley7755 2 ай бұрын
It's not a native Laravel function, it's part of his own package that he mentions throughout this video. Laravel does have a "push" method which can save a model and its relationships at the same time.
@neverything
@neverything 5 ай бұрын
Great video Mateus, thanks for sharing
5 ай бұрын
Glad you enjoyed it my friend!
@gui1gear
@gui1gear 4 ай бұрын
What shortcuts are you using in phpstorm with vim?
4 ай бұрын
Mostly just jumping lines
@gui1gear
@gui1gear 4 ай бұрын
Não fui bem claro kkk… Queria saber se você mudou os shortcut da ide, pois no meu phpstorm ele fica avisando que tá dando conflito de shortcuts por causa do plugin do vim.
4 ай бұрын
@@gui1gear não mudei nada não, que tipo de shortcut vc tá falando? eu entro no normal mode e uso os comandos do vim normalmente
@joshcirre
@joshcirre 5 ай бұрын
This is awesome. Thanks for teaching me. :)
5 ай бұрын
Thanks for watching my dude!
@LileshJadav
@LileshJadav 4 ай бұрын
How about increased memory Usage? Because most developers don’t think about optimisation.
4 ай бұрын
Memory usage would be the same as persisting each model individually.
@Ruggie1of1
@Ruggie1of1 5 ай бұрын
push() exists on models already and is intended to save the model and relationships. (still a good idea to call it inside of a transaction)
5 ай бұрын
Sadly it doesn’t always work - push assumes that models have been persisted already. See: github.com/laravel/framework/issues/48914
@bobbyiliev_
@bobbyiliev_ 5 ай бұрын
Great video! Well done!
5 ай бұрын
Glad you liked it Bobby!
@gAAAia
@gAAAia 2 ай бұрын
Amazing !!!!!! Foultzz
@vladvasilov
@vladvasilov 5 ай бұрын
nice! This is somehow similar to MikroORM persist
5 ай бұрын
Oh cool! I’ll check it out.
@florisvandenberg7424
@florisvandenberg7424 2 ай бұрын
This is basically the datamapper pattern inside the activerecord pattern. Horrible. I really, really, really, really hate Eloquent and Laravel as a whole.
Thinking about Aggregates in Active Record
19:22
Mateus Guimarães
Рет қаралды 2,9 М.
PHP-FPM vs Swoole execution model
15:36
Mateus Guimarães
Рет қаралды 7 М.
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 61 МЛН
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 12 МЛН
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
What I do before coding complex features
20:35
Mateus Guimarães
Рет қаралды 2,3 М.
HTMX Sucks
25:16
Theo - t3․gg
Рет қаралды 129 М.
Using fake objects in automated tests
15:50
Mateus Guimarães
Рет қаралды 2,3 М.
How to properly integrate with 3rd party providers
16:27
Mateus Guimarães
Рет қаралды 2,2 М.
Laravel's secret weapon: macros (watch me code)
23:46
Aaron Francis
Рет қаралды 24 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 184 М.
Top 5 Laravel "Bad Practices" (My Opinion)
10:32
Laravel Daily
Рет қаралды 24 М.
The Tools I Use to Build Products in Laravel
19:00
Josh Cirre
Рет қаралды 40 М.
The dangers of events and observers in Laravel applications
29:06
Mateus Guimarães
Рет қаралды 1,8 М.
Go Iterators Are Bad
36:12
ThePrimeTime
Рет қаралды 105 М.