podcastartgenerator/site/database/factories/OverlayFactory.php
Paul Couture c4398c641e feat/factory_creation (#1)
Prepping for launch.

Reviewed-on: #1
Co-authored-by: Paul Couture <paul@paulcouture.com>
Co-committed-by: Paul Couture <paul@paulcouture.com>
2023-12-14 11:33:03 -06:00

42 lines
870 B
PHP

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