Level 104
Create a separate Factory class for the Post model:
php artisan make:factory PostFactory
The user_id foreign key can be defined as:
[
'user_id' => User::factory(),
// ...
All of this is covered in the docs - https://laravel.com/docs/9.x/eloquent-factories#defining-model-factories
