mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
add about to user objects
This commit is contained in:
parent
a07e64ff51
commit
5d152f0c51
@ -5,6 +5,7 @@ namespace Database\Factories;
|
|||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use Random\RandomException;
|
||||||
|
|
||||||
class UserFactory extends Factory
|
class UserFactory extends Factory
|
||||||
{
|
{
|
||||||
@ -15,6 +16,7 @@ class UserFactory extends Factory
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the user's default state.
|
* Define the user's default state.
|
||||||
|
* @throws RandomException
|
||||||
*/
|
*/
|
||||||
public function definition(): array
|
public function definition(): array
|
||||||
{
|
{
|
||||||
@ -23,6 +25,7 @@ class UserFactory extends Factory
|
|||||||
'email' => fake()->unique()->safeEmail(),
|
'email' => fake()->unique()->safeEmail(),
|
||||||
'email_verified_at' => now(),
|
'email_verified_at' => now(),
|
||||||
'password' => static::$password ??= Hash::make('password'),
|
'password' => static::$password ??= Hash::make('password'),
|
||||||
|
'about' => fake()->paragraphs(random_int(1, 10), true),
|
||||||
'two_factor_secret' => null,
|
'two_factor_secret' => null,
|
||||||
'two_factor_recovery_codes' => null,
|
'two_factor_recovery_codes' => null,
|
||||||
'remember_token' => Str::random(10),
|
'remember_token' => Str::random(10),
|
||||||
|
@ -22,6 +22,7 @@ return new class extends Migration
|
|||||||
$table->string('email')->unique();
|
$table->string('email')->unique();
|
||||||
$table->timestamp('email_verified_at')->nullable();
|
$table->timestamp('email_verified_at')->nullable();
|
||||||
$table->string('password');
|
$table->string('password');
|
||||||
|
$table->longText('about');
|
||||||
$table->foreignIdFor(UserRole::class)
|
$table->foreignIdFor(UserRole::class)
|
||||||
->nullable()
|
->nullable()
|
||||||
->default(null)
|
->default(null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user