MVP components:
- Thread
- Reply
- User
- A. Thread is created by a user
- B. A reply belongs to both a thread and a user
Commands:
- laravel new forum
- php artisan make:model Thread -mr
- php artisan make:model Reply -mc
- php artisan migrate
- php artisan tinker 6. $threads = factory('App\Thread', 50)->create(); 7. $threads->each(function ($thread) { factory('App\Reply', 10)->create(['thread_id' => $thread->id]); });
- php artisan make:auth