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

31 lines
476 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 FormSubmission extends Model
{
use HasFactory;
protected $fillable = [
2024-02-23 11:54:12 +01:00
'data',
2022-09-20 21:59:52 +02:00
];
protected function casts(): array
{
return [
'data' => 'array',
];
}
2022-09-20 21:59:52 +02:00
/**
* RelationShips
*/
2024-02-23 11:54:12 +01:00
public function form()
{
2022-09-20 21:59:52 +02:00
return $this->belongsTo(Form::class);
}
}