You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and dots ('.'), can be up to 35 characters long. Letters must be lowercase.
24 lines
499 B
24 lines
499 B
<?php |
|
|
|
namespace Database\Seeders; |
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents; |
|
use Illuminate\Database\Seeder; |
|
use App\Models\Album; |
|
|
|
class AlbumsSeeder extends Seeder |
|
{ |
|
/** |
|
* Run the database seeds. |
|
*/ |
|
public function run(): void |
|
{ |
|
$faker = \Faker\Factory::create(); |
|
for ($i = 0; $i < 10; $i++) |
|
Album::create([ |
|
"name" => $faker->title(), |
|
"description" => $faker->paragraph(), |
|
]); |
|
|
|
} |
|
}
|
|
|