示例#1
0
 public function onBookmarkRemove()
 {
     $reward = $this->loadReward();
     $user = Auth::getUser();
     Bookmark::removeBookmark($user, $reward);
     return ['.bookmark' => View::make('dma.friends::onBookmarkAdd', ['id' => $reward->id])->render()];
 }
示例#2
0
 public function getIsBookmarkedAttribute()
 {
     $user = Auth::getUser();
     return (bool) Bookmark::findBookmark($user, $this);
 }