Fix the getters in Cart model for a city, a company.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+2
-2
@@ -28,7 +28,7 @@ class Cart extends Model
|
|||||||
|
|
||||||
public function getCity(): City
|
public function getCity(): City
|
||||||
{
|
{
|
||||||
return City::where('city_id', $this->city_id)->first();
|
return City::where('id', $this->city_id)->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function company(): BelongsTo
|
public function company(): BelongsTo
|
||||||
@@ -38,7 +38,7 @@ class Cart extends Model
|
|||||||
|
|
||||||
public function getCompany(): Company
|
public function getCompany(): Company
|
||||||
{
|
{
|
||||||
return Company::where('company_id', $this->company_id)->first();
|
return Company::where('id', $this->company_id)->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function items(): BelongsToMany
|
public function items(): BelongsToMany
|
||||||
|
|||||||
Reference in New Issue
Block a user