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.
38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Course;
|
|
use App\Models\Lecturer;
|
|
use App\Models\User;
|
|
use Database\Factories\Helpers\NostrHelper;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<Course>
|
|
*/
|
|
class CourseFactory extends Factory
|
|
{
|
|
protected $model = Course::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'lecturer_id' => Lecturer::factory(),
|
|
'name' => fake()->randomElement([
|
|
'Bitcoin Basics',
|
|
'Lightning Network Workshop',
|
|
'Self Custody Mastery',
|
|
'Hardware Wallet Setup',
|
|
'Nostr für Anfänger',
|
|
'Sound Money & Austrian Economics',
|
|
'Bitcoin Mining 101',
|
|
'Privacy & Coinjoin',
|
|
]).' #'.fake()->unique()->numberBetween(1, 99999),
|
|
'description' => fake()->paragraphs(2, true),
|
|
'nostr_status' => NostrHelper::fakeNostrEventStatus(),
|
|
'created_by' => User::factory(),
|
|
];
|
|
}
|
|
}
|