22 lines
531 B
PHP
22 lines
531 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class CustomerContact extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'is_primary' => 'boolean', 'is_verified' => 'boolean',
|
|
'can_receive_transactional' => 'boolean', 'can_receive_broadcast' => 'boolean',
|
|
'verified_at' => 'datetime', 'opted_out_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function customer() { return $this->belongsTo(Customer::class); }
|
|
}
|