update table field names

This commit is contained in:
2023-05-25 20:04:53 +10:00
parent aa2671f167
commit 68affe4e4c
4 changed files with 37 additions and 11 deletions

View File

@@ -10,13 +10,23 @@ class AnalyticsSession extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'ip',
'useragent',
];
/**
* Returns the related requests for this session.
*
* @return Illuminate\Database\Eloquent\Relations\HasMany
*/
public function requests(): HasMany {
return $this->hasMany(AnalyticsRequest::class, 'session_id', 'id');
return $this->hasMany(AnalyticsItemRequest::class, 'session_id', 'id');
}
}