Files
opnform-host-nginx/app/Models/Forms/FormStatistic.php
Favour Olayinka bec8e86b59 2f3fd laravel 11 upgrade (#436)
* fix password reset bug

* upgrade to  laravel 11

* composer.lock

* fix migration issues

* use ValidationRule Contract

* rename password_resets table

* implemented casts as protected function

* update env variables

* fix optional property

* fix validation issues

* use <env> on php unit xml

* fix pint

* cmposer.lock

* composer json fixes

* fix composer dependencies, remove  faker

* remove unused class

* remove test class

* fix default value for mysql migration

* linting

* expression syntax fix

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2024-06-10 16:10:14 +02:00

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);
}
}