27 lines
527 B
PHP
27 lines
527 B
PHP
<?php
|
|
|
|
namespace IriksIT\Manager\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* One page someone looked at, within a visit.
|
|
*
|
|
* @property string $day
|
|
*/
|
|
class PageView extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['viewed_at' => 'datetime', 'hour' => 'integer', 'seconds' => 'integer'];
|
|
}
|
|
|
|
/** @return BelongsTo<Visit, $this> */
|
|
public function visit(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Visit::class);
|
|
}
|
|
}
|