opnform-host-nginx/api/app/Models/Forms/FormStatistic.php

40 lines
627 B
PHP
Raw Normal View History

2022-09-20 21:59:52 +02:00
<?php
namespace App\Models\Forms;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class FormStatistic extends Model
{
use HasFactory;
2024-02-23 11:54:12 +01:00
2022-09-20 21:59:52 +02:00
public $timestamps = false;
protected $fillable = [
'form_id',
'data',
2024-02-23 11:54:12 +01:00
'date',
2022-09-20 21:59:52 +02:00
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected function casts(): array
{
return [
'data' => 'array',
];
}
2022-09-20 21:59:52 +02:00
/**
* Relationships
*/
public function form()
{
return $this->belongsTo(Form::class);
}
}