setter
parent
f9642ea6cd
commit
b9416da959
|
@ -229,6 +229,9 @@ class BusinessRepository extends Repository
|
||||||
*/
|
*/
|
||||||
public function agencyHasBusinessCount($agencyCode)
|
public function agencyHasBusinessCount($agencyCode)
|
||||||
{
|
{
|
||||||
|
if(empty($agencyCode)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return Business::where("agency_code", $agencyCode)->count();
|
return Business::where("agency_code", $agencyCode)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,6 +242,9 @@ class BusinessRepository extends Repository
|
||||||
*/
|
*/
|
||||||
public function agencyHasCouponCount($agencyCode)
|
public function agencyHasCouponCount($agencyCode)
|
||||||
{
|
{
|
||||||
|
if(empty($agencyCode)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return Business::alias("a")
|
return Business::alias("a")
|
||||||
->join("coupon_main b", "a.code =b.business_code")
|
->join("coupon_main b", "a.code =b.business_code")
|
||||||
->where("a.agency_code", $agencyCode)
|
->where("a.agency_code", $agencyCode)
|
||||||
|
|
Loading…
Reference in New Issue