public function actionDisplayCouponByCategory() { $category = $_GET['cat']; $couponDetail = new Coupon(); $resultcategory = $couponDetail->couponDetailByCategory($category); if (count($resultcategory) == 0) { echo '<strong>oops!!</strong><br>Looks like there\'s no offer for you...:(<br>'; } else { return $this->renderPartial('displaycouponbycategory', ['cat' => $category, 'resultCategory' => $resultcategory]); } }