adds the role and I'll go ahead and link and socialite
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
@@ -9,7 +11,7 @@
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
final class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The current password being used by the factory.
|
||||
@@ -27,8 +29,10 @@ public function definition(): array
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'password' => self::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
'job_title' => fake()->jobTitle(),
|
||||
'company_name' => fake()->company(),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
@@ -20,6 +22,7 @@ public function up(): void
|
||||
$table->string('photo')->nullable();
|
||||
$table->string('job_title')->nullable();
|
||||
$table->string('department')->nullable();
|
||||
$table->string('company_name')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password')->nullable();
|
||||
|
||||
@@ -23,6 +23,8 @@ public function run(): void
|
||||
'password' => bcrypt('secret'),
|
||||
'email_verified_at' => now(),
|
||||
'role_id' => $adminRole->id,
|
||||
'job_title' => 'Senior Developer',
|
||||
'company_name' => 'Baker Tilly',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user