@@ -70,9 +70,6 @@ class Address extends Model
7070 use SoftDeletes;
7171 use GeoDistanceTrait;
7272
73- protected $ latColumn = 'latitude ' ;
74-
75- protected $ lngColumn = 'longitude ' ;
7673
7774 /**
7875 * {@inheritdoc}
@@ -98,21 +95,21 @@ class Address extends Model
9895 * {@inheritdoc}
9996 */
10097 protected $ casts = [
101- 'addressable_id ' => 'integer ' ,
98+ 'addressable_id ' => 'integer ' ,
10299 'addressable_type ' => 'string ' ,
103- 'label ' => 'string ' ,
104- 'given_name ' => 'string ' ,
105- 'family_name ' => 'string ' ,
106- 'organization ' => 'string ' ,
107- 'country_code ' => 'string ' ,
108- 'street ' => 'string ' ,
109- 'state ' => 'string ' ,
110- 'city ' => 'string ' ,
111- 'postal_code ' => 'string ' ,
112- 'latitude ' => 'float ' ,
113- 'longitude ' => 'float ' ,
114- 'is_primary ' => 'boolean ' ,
115- 'deleted_at ' => 'datetime ' ,
100+ 'label ' => 'string ' ,
101+ 'given_name ' => 'string ' ,
102+ 'family_name ' => 'string ' ,
103+ 'organization ' => 'string ' ,
104+ 'country_code ' => 'string ' ,
105+ 'street ' => 'string ' ,
106+ 'state ' => 'string ' ,
107+ 'city ' => 'string ' ,
108+ 'postal_code ' => 'string ' ,
109+ 'latitude ' => 'float ' ,
110+ 'longitude ' => 'float ' ,
111+ 'is_primary ' => 'boolean ' ,
112+ 'deleted_at ' => 'datetime ' ,
116113 ];
117114
118115 /**
@@ -139,6 +136,10 @@ public function __construct(array $attributes = [])
139136 {
140137 $ this ->setTable (config ('addressable.tables.addresses ' ));
141138
139+ $ this ->latColumn = 'latitude ' ;
140+
141+ $ this ->lngColumn = 'longitude ' ;
142+
142143 parent ::__construct ($ attributes );
143144 }
144145
0 commit comments