54 lines
1.4 KiB
PHP
54 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
|
|
use App\Models\Device;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
// \App\Models\User::factory(10)->create();
|
|
|
|
// \App\Models\User::factory()->create([
|
|
// 'name' => 'Test User',
|
|
// 'email' => 'test@example.com',
|
|
// ]);
|
|
|
|
Device::factory()->create([
|
|
'device_id' => '1',
|
|
'title' => 'Test Device One',
|
|
'device_type' => 'type1',
|
|
'description' => 'des',
|
|
'accessories' => 'acc',
|
|
'rz_username_buyer' => 'rzb',
|
|
'serial_number' => '123',
|
|
'image_url' => 'www.url.de'
|
|
]);
|
|
|
|
//User::create([
|
|
// [
|
|
// 'rz_username' => 'admin',
|
|
// 'full_name' => 'Admin',
|
|
// 'organisation_unit' => '11111111',
|
|
// 'has_admin_privileges' => true,
|
|
// 'hashed_password' => 'vollgeheim'
|
|
// ],
|
|
// [
|
|
// 'rz_username' => 'user',
|
|
// 'full_name' => 'User',
|
|
// 'organisation_unit' => '66666666',
|
|
// 'has_admin_privileges' => false,
|
|
// 'hashed_password' => 'test123'
|
|
// ]
|
|
//]);
|
|
}
|
|
}
|