podcastartgenerator/site/database/factories/PodcastFactory.php

31 lines
736 B
PHP
Raw Normal View History

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use App\Models\Podcast;
class PodcastFactory extends Factory
{
/**
* 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(),
];
}
}