40 lines
783 B
PHP
40 lines
783 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class MailwizzConfig extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'preregistration_page_id',
|
|
'api_key',
|
|
'list_uid',
|
|
'list_name',
|
|
'field_email',
|
|
'field_first_name',
|
|
'field_last_name',
|
|
'field_phone',
|
|
'tag_field',
|
|
'tag_value',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'api_key' => 'encrypted',
|
|
];
|
|
}
|
|
|
|
public function preregistrationPage(): BelongsTo
|
|
{
|
|
return $this->belongsTo(PreregistrationPage::class);
|
|
}
|
|
}
|