mirror of
https://github.com/koel/koel
synced 2024-11-14 16:37:28 +00:00
22 lines
456 B
PHP
22 lines
456 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Album;
|
|
use App\Models\Artist;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class AlbumFactory extends Factory
|
|
{
|
|
protected $model = Album::class;
|
|
|
|
/** @inheritdoc */
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'artist_id' => Artist::factory(),
|
|
'name' => $this->faker->colorName,
|
|
'cover' => md5(uniqid()) . '.jpg',
|
|
];
|
|
}
|
|
}
|