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

40 lines
627 B
PHP

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