fix: refactored the codebase

This commit is contained in:
2026-08-20 23:00:47 +02:00
parent 6f47ed0674
commit a77f74911d
64 changed files with 2864 additions and 1739 deletions
@@ -0,0 +1,25 @@
<?php
namespace App\Services\Settings;
use App\Models\User;
use Illuminate\Database\Eloquent\Collection;
use Laravel\Passkeys\Passkey;
class SecuritySettingsService
{
/**
* @return Collection<int, Passkey>
*/
public function passkeys(User $user, bool $enabled): Collection
{
if (! $enabled) {
return new Collection;
}
return $user->passkeys()
->select(['id', 'user_id', 'name', 'credential', 'created_at', 'last_used_at'])
->latest()
->get();
}
}