mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-11-03 22:13:18 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			631 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			631 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
namespace Crater;
 | 
						|
 | 
						|
use Illuminate\Database\Eloquent\Model;
 | 
						|
use Crater\User;
 | 
						|
use Crater\Country;
 | 
						|
 | 
						|
class Address extends Model
 | 
						|
{
 | 
						|
    const BILLING_TYPE = 'BILLING';
 | 
						|
    const SHIPPING_TYPE = 'SHIPPING';
 | 
						|
 | 
						|
    protected $fillable = [
 | 
						|
        'name',
 | 
						|
        'address_street_1',
 | 
						|
        'address_street_2',
 | 
						|
        'city',
 | 
						|
        'state',
 | 
						|
        'country_id',
 | 
						|
        'zip',
 | 
						|
        'phone',
 | 
						|
        'fax',
 | 
						|
        'type',
 | 
						|
        'user_id'
 | 
						|
    ];
 | 
						|
 | 
						|
    public function user()
 | 
						|
    {
 | 
						|
        return $this->belongsTo(User::class);
 | 
						|
    }
 | 
						|
 | 
						|
    public function country()
 | 
						|
    {
 | 
						|
        return $this->belongsTo(Country::class);
 | 
						|
    }
 | 
						|
}
 |