46 lines
1.6 KiB
PHP
46 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* App\Models\ShippingCountry
|
|
*
|
|
* @property int $id
|
|
* @property int $shipping_id
|
|
* @property int|null $country_id
|
|
* @property \Illuminate\Support\Carbon|null $created_at
|
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
|
* @property-read \App\Models\Country|null $country
|
|
* @property-read \App\Models\Shipping $shipping
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereCountryId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereShippingId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingCountry whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class ShippingCountry extends Model
|
|
{
|
|
protected $table = 'shipping_countries';
|
|
|
|
|
|
protected $fillable = [
|
|
'shipping_id', 'country_id'
|
|
];
|
|
|
|
public function shipping()
|
|
{
|
|
return $this->belongsTo('App\Models\Shipping', 'shipping_id');
|
|
}
|
|
|
|
public function country()
|
|
{
|
|
return $this->belongsTo('App\Models\Country', 'country_id');
|
|
}
|
|
|
|
}
|