replaces factories with db facade
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
final class JonathanSeeder extends Seeder
|
||||
{
|
||||
@@ -17,7 +17,7 @@ public function run(): void
|
||||
{
|
||||
$adminRole = Role::where('name', 'admin')->first();
|
||||
|
||||
User::factory()->create([
|
||||
DB::table('users')->insert([
|
||||
'name' => 'Jonathan',
|
||||
'email' => 'jonathan.van.rij@agerion.nl',
|
||||
'password' => bcrypt('secret'),
|
||||
@@ -25,6 +25,8 @@ public function run(): void
|
||||
'role_id' => $adminRole->id,
|
||||
'job_title' => 'Senior Developer',
|
||||
'company_name' => 'Baker Tilly',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user