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 11 months 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 p [...]

Continue reading

  • 249
  • 308
  • By Bablu Ahmed
  • Posted 11 months 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 the database/see [...]

Continue reading

  • 249
  • 308
  • By Bablu Ahmed
  • Posted 11 months ago