cms/app/Models/Form.php

27 lines
429 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Form extends Model
{
protected $fillable = [
'name',
'slug',
'fields',
'success_message',
'redirect_url',
'notification_email',
];
protected $casts = [
'fields' => 'array',
];
public function submissions()
{
return $this->hasMany(FormSubmission::class);
}
}