2020-11-14 16:57:25 +00:00
|
|
|
<?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;
|
|
|
|
|
2020-12-22 20:11:22 +00:00
|
|
|
/** @return array<mixed> */
|
2020-11-14 16:57:25 +00:00
|
|
|
public function definition(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'artist_id' => Artist::factory(),
|
2021-07-26 21:21:36 +00:00
|
|
|
'name' => $this->faker->colorName,
|
2020-12-22 20:11:22 +00:00
|
|
|
'cover' => md5(uniqid()) . '.jpg',
|
2020-11-14 16:57:25 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|