add about to user objects

This commit is contained in:
IsWaffle 2024-09-10 13:31:14 -04:00
parent a07e64ff51
commit 5d152f0c51
2 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@ namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
use Random\RandomException;
class UserFactory extends Factory
{
@ -15,6 +16,7 @@ class UserFactory extends Factory
/**
* Define the user's default state.
* @throws RandomException
*/
public function definition(): array
{
@ -23,6 +25,7 @@ class UserFactory extends Factory
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'about' => fake()->paragraphs(random_int(1, 10), true),
'two_factor_secret' => null,
'two_factor_recovery_codes' => null,
'remember_token' => Str::random(10),

View File

@ -22,6 +22,7 @@ return new class extends Migration
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->longText('about');
$table->foreignIdFor(UserRole::class)
->nullable()
->default(null)