Commit c28ef59d authored by Egor Kremnev's avatar Egor Kremnev

edit seeds

parent 84b01aba
......@@ -15,6 +15,10 @@ class ArticlesTableSeeder extends Seeder
*/
public function run()
{
if (Article::count()) {
return;
}
$users = User::all();
$users->each(function($user) {
Article::factory()->count(15)->for($user)->create();
......
......@@ -14,6 +14,10 @@ class UsersTableSeeder extends Seeder
*/
public function run()
{
if (User::count()) {
return;
}
User::factory()->count(3)->create();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment