38 lines
752 B
PHP
38 lines
752 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 Subscriber extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'preregistration_page_id',
|
|
'first_name',
|
|
'last_name',
|
|
'email',
|
|
'phone',
|
|
'synced_to_mailwizz',
|
|
'synced_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'synced_to_mailwizz' => 'boolean',
|
|
'synced_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function preregistrationPage(): BelongsTo
|
|
{
|
|
return $this->belongsTo(PreregistrationPage::class);
|
|
}
|
|
}
|