'int', 'auth_user_id' => 'int', 'is_host' => 'bool', 'billing_country_id' => 'int', 'same_as_billing' => 'bool', 'shipping_country_id' => 'int', 'has_buyed' => 'bool', 'subscribed' => 'bool', ]; protected $dates = [ 'user_deleted_at' ]; protected $fillable = [ 'homeparty_id', 'auth_user_id', 'is_host', 'billing_salutation', 'billing_company', 'billing_firstname', 'billing_lastname', 'billing_address', 'billing_address_2', 'billing_zipcode', 'billing_city', 'billing_country_id', 'billing_phone', 'billing_email', 'same_as_billing', 'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_country_id', 'shipping_phone', 'shipping_email', 'has_buyed', 'subscribed', 'notice', 'mode', 'user_deleted_at' ]; public function homeparty() { return $this->belongsTo(Homeparty::class); } public function auth_user() { return $this->belongsTo(User::class, 'auth_user_id'); } public function billing_country() { return $this->belongsTo('App\Models\Country','billing_country_id'); } public function shipping_country() { return $this->belongsTo('App\Models\Country','shipping_country_id'); } public function homeparty_user_order_items(){ return $this->hasMany('App\Models\HomepartyUserOrderItem','homeparty_user_id'); } public function isAddress(){ if($this->billing_firstname !== null){ return true; } return false; } }