2023-06-21 09:53:21 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
use Illuminate\Support\Str;
|
2023-07-29 02:05:43 -04:00
|
|
|
use App\Models\Podcast;
|
2023-06-21 09:53:21 -04:00
|
|
|
|
|
|
|
class PodcastFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* 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,
|
2023-06-21 09:53:21 -04:00
|
|
|
'description' => fake()->paragraphs(rand(1,3), true),
|
|
|
|
'website' => 'https://' . fake()->domainName(),
|
2023-07-29 02:05:43 -04:00
|
|
|
'feed' => 'podcast/' . $slug,
|
|
|
|
'slug' => $slug,
|
2023-06-21 09:53:21 -04:00
|
|
|
'published' => fake()->boolean(),
|
|
|
|
'added_at' => fake()->dateTimeThisDecade(),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|