39 lines
711 B
PHP
39 lines
711 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Address extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
'is_address',
|
|
'is_delivery',
|
|
'name',
|
|
'email',
|
|
'phone',
|
|
'address',
|
|
'city',
|
|
'state',
|
|
'country',
|
|
'zip',
|
|
];
|
|
|
|
/**
|
|
* Return the customer having the address.
|
|
*/
|
|
public function customer(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Customer::class);
|
|
}
|
|
}
|