32 lines
548 B
PHP
32 lines
548 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use App\Enums\ContactFormCivility;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Kwaadpepper\Enum\Traits\CastsEnums;
|
||
|
|
|
||
|
|
class DeliveryAddress extends Model
|
||
|
|
{
|
||
|
|
use CastsEnums;
|
||
|
|
|
||
|
|
protected $enumCasts = [
|
||
|
|
'civility' => ContactFormCivility::class
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'civility',
|
||
|
|
'lastname',
|
||
|
|
'firstname',
|
||
|
|
'address',
|
||
|
|
'postcode',
|
||
|
|
'city',
|
||
|
|
'phone'
|
||
|
|
];
|
||
|
|
|
||
|
|
public function order()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Order::class);
|
||
|
|
}
|
||
|
|
}
|