Build a Monthly Subscription App with Laravel Cashier


We have the database tables and fields ready thanks to migrations. We also have the means to create fake data thanks to model factories.

The only thing left to do is to create our fake data. Here are the quick commands to get data into the database:

// database/seeds/DatabaseSeeder.php

// clear the database

// fill the database
// the post model factory will create a new user/author for each post
factory(App\Post::class, 8)->create();

Then we can run the seeder with php artisan db:seed.

You'll be able to see the new posts and users in your database!

Like this article? Follow @chrisoncode on Twitter