*/ protected $fillable = [ 'ip', 'useragent', 'ended_at' ]; /** * Set the "useragent" attribute. * * @param mixed $value * @return void */ public function setUseragentAttribute($value) { $this->attributes['useragent'] = $value !== null ? $value : ''; } /** * Returns the related requests for this session. * * @return Illuminate\Database\Eloquent\Relations\HasMany */ public function requests(): HasMany { return $this->hasMany(AnalyticsItemRequest::class, 'session_id', 'id'); } }