feat: site
This commit is contained in:
@@ -98,13 +98,17 @@ class Site extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Builder[]|Collection
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getAllSiteList(): Collection|array
|
public function getAllSiteList(): array
|
||||||
{
|
{
|
||||||
return $this
|
$res = $this
|
||||||
->where('is_del',SiteCode::SITE_NO_DEL)
|
->where('is_del',SiteCode::SITE_NO_DEL)
|
||||||
->where('status',SiteCode::SITE_ENABLE)
|
->where('status',SiteCode::SITE_ENABLE)
|
||||||
->get(['id','name','kitchen_id','city_id','address','lng','lat']);
|
->get(['id','name','kitchen_id','city_id','address','lng','lat']);
|
||||||
|
|
||||||
|
if (empty($res)) return [];
|
||||||
|
|
||||||
|
return $res->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user