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.
28 lines
729 B
PHP
28 lines
729 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\TwitterAccount;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends Factory<TwitterAccount>
|
|
*/
|
|
class TwitterAccountFactory extends Factory
|
|
{
|
|
protected $model = TwitterAccount::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'twitter_id' => (string) fake()->unique()->numberBetween(100000, 999999999),
|
|
'nickname' => fake()->unique()->userName(),
|
|
'token' => Str::random(40),
|
|
'expires_in' => 7200,
|
|
'data' => json_encode(['scope' => ['tweet.read', 'tweet.write', 'users.read']]),
|
|
'refresh_token' => Str::random(40),
|
|
];
|
|
}
|
|
}
|