feat: implement candidate security honeypots and redesign authenticated layout
This commit is contained in:
26
app/Models/SecurityAlert.php
Normal file
26
app/Models/SecurityAlert.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SecurityAlert extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'type',
|
||||
'endpoint',
|
||||
'payload',
|
||||
'ip_address',
|
||||
'user_agent',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'payload' => 'array',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,11 @@ class User extends Authenticatable
|
||||
return $this->belongsTo(Tenant::class);
|
||||
}
|
||||
|
||||
public function securityAlerts()
|
||||
{
|
||||
return $this->hasMany(SecurityAlert::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user