Eloquent ORM & Query Builder

Eloquent ORM is slower than Query Builder but we can make relationship with Models and easier to build & less code on the other side, the Query Builder is a little bit hard but more faster.

 

Eloquent ORM

InsertContinue reading

  • 249
  • 308
  • By Bablu Ahmed
  • Posted 1 year ago

Difference between Model Factory and a DB Seeder

Database seeder is a number of data that populates tables.

For example:

factory(App\User::class, 50)->create(); 

As we can see here 50 users will be created by the seeder.

On the other hand, Model factories (instructions) is a convenient centralized place to [...]

Continue reading

  • 249
  • 308
  • By Bablu Ahmed
  • Posted 1 year ago

Database Seeding

Introduction:

Database seeds are a way of programmatically inserting a number of data into the database and one advantage to using them is you can quickly get dummy data into your app using seed classes. All seed classes are stored in [...]

Continue reading

  • 249
  • 308
  • By Bablu Ahmed
  • Posted 1 year ago