Exemplo n.º 1
0
 /**
  * Get non-featured tours with banners and not expired
  * 
  * @param number $perPage
  * @return collection
  */
 public function getNonFeaturedTours($perPage = 100)
 {
     return Tour::whereFeatured(false)->where('banner', '<>', '')->where('end_date', '>', $this->currentDate)->orderBy('updated_at', 'desc')->paginate($perPage);
 }
Exemplo n.º 2
0
 /**
  * Get featured tours with banners and not expired
  *
  * @param int $limit
  * @return Tour collection
  */
 public function getFeaturedTours($perPage = 100)
 {
     return Tour::whereFeatured(true)->orderBy('id', 'desc')->paginate($perPage);
 }