2023-06-21 09:53:21 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
2023-07-29 02:05:43 -04:00
|
|
|
use Illuminate\Support\Str;
|
|
|
|
use App\Models\Artist;
|
2023-08-22 17:04:37 -04:00
|
|
|
use App\Models\Artwork;
|
|
|
|
use App\Models\Episode;
|
|
|
|
use App\Models\Podcast;
|
|
|
|
use App\Models\Overlay;
|
2023-07-29 02:05:43 -04:00
|
|
|
|
2023-06-21 09:53:21 -04:00
|
|
|
|
|
|
|
class OverlayFactory extends Factory
|
|
|
|
{
|
2023-08-22 17:04:37 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = Overlay::class;
|
|
|
|
|
2023-06-21 09:53:21 -04:00
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
2023-07-29 02:05:43 -04:00
|
|
|
$name = fake()->name();
|
|
|
|
$slug = Str::slug($name);
|
2023-06-21 09:53:21 -04:00
|
|
|
return [
|
2023-07-29 02:05:43 -04:00
|
|
|
'name' => $name,
|
|
|
|
'artist_id' => Artist::factory(),
|
|
|
|
'podcast_id' => Podcast::factory(),
|
|
|
|
'available' => fake()->boolean(),
|
|
|
|
'filename' => fake()->imageUrl(3000, 3000),
|
2023-06-21 09:53:21 -04:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|