Hello guys i want my code to round off all the rating, but if the rating is null or empty, it should ignore that. laravel

后端 未结 0 1688
野性不改
野性不改 2021-02-03 12:43

Round off all rating but ignore it if its null or 0.

Below is my code:

$star = $ratings->count() > 0 ? round($ratings->sum(\'rating\') / $ratings->coun

相关标签:
回答
  • 消灭零回复
提交回复
热议问题