Tests for Login

Learn about Laravel Factories that help with quick records generation during the process of adding more tests.

Factories in motion

Time to use one more Laravel goodie called Factory. Usually, developers need to manually add a record in the database table to quickly test data retrieval. But that does not scale in terms of the number of records and the number of times we need to repeat the process.

Laravel factories allow us to add any number of records with random data according to different types of columns. By executing a single line, we can add thousands of records in one go. You will see their usage throughout this course.

Fix the default factory

...