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