20 lines
386 B
PHP
20 lines
386 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Image;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Seed the application's database.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
\App\Models\User::factory(10)->create();
|
|
\App\Models\Product::factory(10)->has(Image::factory()->count(3))->create();
|
|
}
|
|
}
|