feat: fill out credentials when local, set remember to default true

This commit is contained in:
Benjamin Nussbaum 2025-03-11 15:32:02 +01:00
parent de097c90dc
commit 276511fc98
2 changed files with 12 additions and 1 deletions

View file

@ -3,6 +3,7 @@
namespace Database\Seeders;
use App\Models\Device;
use App\Models\Plugin;
use App\Models\User;
use Illuminate\Database\Seeder;
@ -23,6 +24,8 @@ class DatabaseSeeder extends Seeder
]);
// Device::factory(5)->create();
// Plugin::factory(3)->create();
}
}
}

View file

@ -17,7 +17,7 @@ new #[Layout('components.layouts.auth')] class extends Component {
#[Validate('required|string')]
public string $password = '';
public bool $remember = false;
public bool $remember = true;
/**
* Handle an incoming authentication request.
@ -70,6 +70,14 @@ new #[Layout('components.layouts.auth')] class extends Component {
{
return Str::transliterate(Str::lower($this->email) . '|' . request()->ip());
}
public function mount(): void
{
if (app()->isLocal()) {
$this->email = 'admin@example.com';
$this->password = 'admin@example.com';
}
}
}; ?>
<div class="flex flex-col gap-6">