mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-03 16:24:55 +00:00
1f0bfba0d3
🛠️ **Factory:** Created factories for `TwitterAccount`, `EmailCampaign`, `EmailTexts`, and `BookCase`. ✨ **Helper:** Added `NostrHelper` with methods for generating fake/mocked Nostr data. ⬆️ **Dependencies:** Updated multiple Composer dependencies including `laravel/framework`, `astrotomic/laravel-translatable`, and others to their latest versions.
36 lines
895 B
PHP
36 lines
895 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Podcast;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends Factory<Podcast>
|
|
*/
|
|
class PodcastFactory extends Factory
|
|
{
|
|
protected $model = Podcast::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
$name = 'Einundzwanzig Podcast '.fake()->unique()->numberBetween(1, 9999);
|
|
|
|
return [
|
|
'guid' => (string) Str::uuid(),
|
|
'locked' => true,
|
|
'title' => $name,
|
|
'link' => 'https://einundzwanzig.space/podcast/'.Str::slug($name),
|
|
'language_code' => 'de',
|
|
'data' => json_encode([
|
|
'description' => fake()->paragraph(),
|
|
'author' => 'Einundzwanzig',
|
|
'image' => null,
|
|
]),
|
|
'created_by' => User::factory(),
|
|
];
|
|
}
|
|
}
|