mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-03 16:24:55 +00:00
🎨 **Style:** Fixed indentation inconsistencies in meetup_user migration file.
🛠️ **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.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Lecturer;
|
||||
use App\Models\User;
|
||||
use Database\Factories\Helpers\NostrHelper;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Lecturer>
|
||||
*/
|
||||
class LecturerFactory extends Factory
|
||||
{
|
||||
protected $model = Lecturer::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
$firstName = fake()->firstName();
|
||||
$lastName = fake()->lastName();
|
||||
$name = $firstName.' '.$lastName.' '.fake()->unique()->numberBetween(1, 99999);
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
'active' => true,
|
||||
'description' => fake()->paragraphs(2, true),
|
||||
'subtitle' => 'Bitcoin-Pädagoge & Autor',
|
||||
'intro' => fake()->paragraph(),
|
||||
'twitter_username' => '@'.fake()->userName(),
|
||||
'website' => 'https://'.fake()->domainName(),
|
||||
'lightning_address' => NostrHelper::randomLightningAddress($firstName),
|
||||
'lnurl' => null,
|
||||
'node_id' => null,
|
||||
'nostr' => NostrHelper::randomNpub(),
|
||||
'paynym' => null,
|
||||
'created_by' => User::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user