Files

36 lines
728 B
PHP
Raw Permalink Normal View History

2026-03-19 14:53:54 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class DailyAggregate extends Model
{
protected $fillable = [
'website_id',
'date',
'visitors',
'sessions',
'page_views',
'bounce_count',
'total_duration',
];
protected function casts(): array
{
return [
'visitors' => 'integer',
'sessions' => 'integer',
'page_views' => 'integer',
'bounce_count' => 'integer',
'total_duration' => 'integer',
];
}
public function website(): BelongsTo
{
return $this->belongsTo(Website::class);
}
}