42 lines
971 B
PHP
42 lines
971 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 PodcastFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Podcast::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition()
|
|
{
|
|
$name = fake()->name();
|
|
$slug = Str::slug($name);
|
|
return [
|
|
'name' => $name,
|
|
'description' => fake()->paragraphs(rand(1,3), true),
|
|
'website' => 'https://' . fake()->domainName(),
|
|
'feed' => 'podcast/' . $slug,
|
|
'slug' => $slug,
|
|
'published' => fake()->boolean(),
|
|
'added_at' => fake()->dateTimeThisDecade(),
|
|
];
|
|
}
|
|
}
|