2023-06-21 09:53:21 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
2023-07-29 02:05:43 -04:00
|
|
|
use App\Models\Artist;
|
|
|
|
use App\Models\User;
|
2023-06-21 09:53:21 -04:00
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
|
|
|
|
class ArtistFactory extends Factory
|
|
|
|
{
|
2023-07-29 02:05:43 -04:00
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = Artist::class;
|
|
|
|
|
2023-06-21 09:53:21 -04:00
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
2023-07-29 02:05:43 -04:00
|
|
|
'user_id' => User::factory(),
|
|
|
|
'name' => fake()->name(),
|
|
|
|
'avatar' => fake()->imageUrl(512, 512),
|
|
|
|
'header' => fake()->imageUrl(270, 185),
|
|
|
|
'location' => fake()->city() . ', ' . fake()->state(),
|
|
|
|
'website' => rand(0, 1) ? fake()->url : null,
|
|
|
|
'bio' => fake()->paragraphs(rand(1,3, true)),
|
2023-06-21 09:53:21 -04:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|