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:
@@ -2,27 +2,42 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\City;
|
||||
use App\Models\Meetup;
|
||||
use App\Models\User;
|
||||
use Database\Factories\Helpers\NostrHelper;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Meetup>
|
||||
* @extends Factory<Meetup>
|
||||
*/
|
||||
class MeetupFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
protected $model = Meetup::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
$name = fake()->company();
|
||||
$cityName = fake()->city();
|
||||
$name = 'Bitcoin Meetup '.$cityName;
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
'slug' => \Illuminate\Support\Str::slug($name),
|
||||
'city_id' => City::factory(),
|
||||
'name' => $name.' '.fake()->unique()->numberBetween(1, 99999),
|
||||
'slug' => Str::slug($name).'-'.fake()->unique()->numberBetween(1000, 99999),
|
||||
'intro' => fake()->paragraph(),
|
||||
'telegram_link' => 'https://t.me/'.Str::slug($cityName).'_btc',
|
||||
'webpage' => 'https://'.Str::slug($cityName).'.einundzwanzig.space',
|
||||
'twitter_username' => fake()->boolean(40) ? '@btc_'.Str::slug($cityName) : null,
|
||||
'github_data' => [],
|
||||
'created_by' => \App\Models\User::factory(),
|
||||
'matrix_group' => null,
|
||||
'community' => fake()->boolean(80) ? 'einundzwanzig' : null,
|
||||
'visible_on_map' => true,
|
||||
'simplex' => null,
|
||||
'signal' => null,
|
||||
'nostr' => NostrHelper::randomNpub(),
|
||||
'nostr_status' => NostrHelper::fakeNostrEventStatus(),
|
||||
'created_by' => User::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user