Implement device and IP tracking for users

Added Device and UserIp models and migrations to store device fingerprints and user IPs with expiration. Updated ShowSavingIp Livewire component and view to capture and persist both IP and device fingerprint. Introduced a scheduled command to clean expired user IPs and registered it in the console kernel. Removed the old migration for storing IPs directly on the users table.
This commit is contained in:
Juan Felipe Duarte
2025-10-25 09:18:56 -05:00
parent a558e393f2
commit 4a44dbc1c1
9 changed files with 168 additions and 42 deletions
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Device extends Model
{
use HasFactory;
protected $fillable = ['user_id', 'fingerprint', 'last_seen_at'];
}