Example #1
0
 /**
  * @return bool
  */
 public function articleIndexNeedFeedBack()
 {
     \Log::info('hongbao---reason' . \Cache::has($this->getCacheArticleBeanFeedKey()));
     if (!\Cache::has($this->getCacheArticleBeanFeedKey())) {
         return true;
     }
     if (\Cache::get($this->getCacheArticleBeanFeedKey()) >= 5) {
         return false;
     }
     return true;
 }
Example #2
0
 public function getFullUrlAttribute()
 {
     if ($this->parent && substr($this->url, 0, 1) !== '/') {
         \Log::info($this->parent);
         return $this->parent->getFullUrlAttribute() . '/' . $this->url;
     } else {
         return $this->url;
     }
 }