A few different ways to seed databases in Laravel

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 7

  • @richardtrudel5363
    @richardtrudel5363 7 หลายเดือนก่อน

    Another trick: if you have taxonomies, pre-built categories or any special things you want to seed into your database when you start a new project, you can read from a JSON file then run a foreach loop in a seeder. You can also verify for the existence of the model rows before actually create it. Useful for seeding countries, languages, topics or some other stuff like that.

  • @abdulbasitsalah2918
    @abdulbasitsalah2918 ปีที่แล้ว +1

    Thank you, really great video for understanding database seeder and factories

  • @tukurhamid
    @tukurhamid 2 หลายเดือนก่อน

    Thank you very much, this was helpful

  • @najbo73
    @najbo73 ปีที่แล้ว

    Excellent tutorial, thanks a lot.

  • @nielsdrost6448
    @nielsdrost6448 ปีที่แล้ว

    Thanks for that video, man! Maybe good for a follow-up video: seeding 10 users and then for each user ... random 1 through 5 comments. $users = (all 10 users)->each->closure->(using extra variables)

  • @hc5131
    @hc5131 ปีที่แล้ว

    thanks alot!

  • @constantine9074
    @constantine9074 7 หลายเดือนก่อน

    Yeeey.. No more conditionals or loops ... thanks