Merge pull request #150 from openclassify/dia

show most viewed ads in the trending ads tab
This commit is contained in:
Fatih Alp 2019-11-15 17:57:33 +03:00 committed by GitHub
commit 3ce8308e23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,7 +152,7 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
public function popularAdvs()
{
return $this->getAdv()->where('popular_adv', 1)->paginate(2);
return $this->getAdv()->orderBy('count_show_ad', 'desc')->limit(10)->get();
}
public function advsofDay()