feat: add tests, chore: update readme

This commit is contained in:
Benjamin Nussbaum 2025-03-03 22:20:52 +01:00
parent 715e6a2562
commit e6a2bdb3bc
27 changed files with 1179 additions and 299 deletions

View file

@ -2,10 +2,12 @@
namespace Database\Seeders;
use App\Models\Device;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
class DatabaseSeeder extends Seeder
{
/**
@ -13,12 +15,14 @@ class DatabaseSeeder extends Seeder
*/
public function run(): void
{
// User::factory(10)->create();
if (app()->isLocal()) {
User::factory()->create([
'name' => 'Test User',
'email' => 'admin@example.com',
'password' => bcrypt('admin@example.com'),
]);
User::factory()->create([
'name' => 'Test User',
'email' => 'admin@example.com',
'password' => bcrypt('admin@example.com'),
]);
// Device::factory(5)->create();
}
}
}