sarga/packages/Webkul/Customer/src/Models/CustomerAddress.php

21 lines
597 B
PHP
Raw Normal View History

2018-07-20 15:15:21 +00:00
<?php
namespace Webkul\Customer\Models;
use Illuminate\Database\Eloquent\Model;
2019-02-18 07:30:40 +00:00
use Webkul\Customer\Contracts\CustomerAddress as CustomerAddressContract;
2018-07-20 15:15:21 +00:00
2019-02-18 07:30:40 +00:00
class CustomerAddress extends Model implements CustomerAddressContract
2018-07-20 15:15:21 +00:00
{
protected $table = 'customer_addresses';
2020-01-28 05:25:00 +00:00
protected $fillable = ['customer_id' ,'address1', 'country', 'state', 'city', 'postcode', 'phone', 'default_address', 'first_name', 'last_name'];
/**
2020-01-28 05:27:17 +00:00
* Get the customer address full name.
2020-01-28 05:25:00 +00:00
*/
public function getNameAttribute()
{
return $this->first_name . ' ' . $this->last_name;
}
2018-07-20 15:15:21 +00:00
}