ShippingAddres.php 602 Bytes
Newer Older
Francisco Salazar committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<?php

namespace Onestartup\Shop\Model;

use Illuminate\Database\Eloquent\Model;

class ShippingAddres extends Model
{
    protected $table = 'shipping_addres';
    protected $fillable = [
    	'cp',
		'calle',
		'numero',
		'colonia',
		'ciudad',
		'estado',
        'referencias',
		'client_id',
        'shipping_price_id'
    ];

    public function client()
    {
        return $this->belongsTo('Onestartup\Shop\Model\ClientShop', 'client_id');
    }

    public function shipping_price()
    {
        return $this->belongsTo('Onestartup\Shop\Model\ShippingPrice', 'shipping_price_id');
    }
}