A few different ways to seed databases in Laravel

Опубликовано: 18 Июль 2023
на канале: Andrew Schmelyun
4,097
152

If you want to automate adding data into your Laravel application, seeding is the way to go! Whether it's for testing purposes or adding in loads of production details, Laravel's seeders and factories help to rapidly fill up your database tables.

In this video I'll show you a few different ways to seed data into your database. We'll start out simple with just single models and the create method, and move up to custom factories and seeder classes.

0:00 Getting Started
0:31 Seeding Single Models
1:38 Using Factories
6:49 Seeder Classes
9:48 Seeding Model Relationships
12:50 Wrapping Up

Send me new video ideas and vote on what's coming next: https://suggest.gg/aschmelyun

Follow me on Twitter!   / aschmelyun  

Join my newsletter, where I send out new information about twice each month in the PHP, JavaScript, and Docker realms: https://aschmelyun.substack.com


Смотрите видео A few different ways to seed databases in Laravel онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Andrew Schmelyun 18 Июль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,097 раз и оно понравилось 152 людям.