Laravel Seeder with Progress Bars and Factories

preview_player
Показать описание
I want to demonstrate the great work of the Filament team on data seeders in their official demo.

Links mentioned in the video:

- - - - -
Support the channel by checking out my products:

- - - - -
Other places to follow:
Рекомендации по теме
Комментарии
Автор

Thanks for this. The factory has() is something I kind of knew but your explanation made me understand it. This is going to save me some time now. 🎉

bballantyne
Автор

Amazing how you always seem to read our minds about what we're working on at the moment 😅I used the progress bar in a recent project for a command that needed to make an API request and store/update a moderate amount of records from it, it really helped to show that something is actually occurring and what you typed didn't just go off into the void.

JJASMR
Автор

After trying this approach. It turned out that seeders class doesn't come with "withProgressBar()" method, but it's a protected method at the end of the file.
Great content as usual.

akaKaynite
Автор

Note that a terminal IO takes unnoticeable time. But too much IO will make the process noticeably slower.

medilies
Автор

Can we get a video on when to use dependency injection and when to use traits

testertest
Автор

In code you have, 20 iterations and Count(20) in callback function, its mean each iteration it will create 20 records? 20*20=400?

L-A-O-S
Автор

If yoy want to suppress the output of :
Database\Seeders\UsersSeeder RUNNING
Database\Seeders\UsersSeeder 165.64 ms DONE
you can add it to the call in the DatabaseSeeder class : $this->call(UsersSeeder::class, silent: true);

kreaweb-be