phase 6
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class PageDailyAggregate extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'website_id',
|
||||
'date',
|
||||
'path',
|
||||
'views',
|
||||
'unique_views',
|
||||
'total_time_on_page',
|
||||
'bounces',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'date' => 'date',
|
||||
'views' => 'integer',
|
||||
'unique_views' => 'integer',
|
||||
'total_time_on_page' => 'integer',
|
||||
'bounces' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function website(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Website::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user