Merge pull request #353 from pixelfed/frontend-ui-refactor

Update Status model
pull/356/head
daniel 7 years ago committed by GitHub
commit 9dba310f2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -92,6 +92,9 @@ class Status extends Model
public function bookmarked() public function bookmarked()
{ {
if(!Auth::check()) {
return 0;
}
$profile = Auth::user()->profile; $profile = Auth::user()->profile;
return Bookmark::whereProfileId($profile->id)->whereStatusId($this->id)->count(); return Bookmark::whereProfileId($profile->id)->whereStatusId($this->id)->count();
} }

Loading…
Cancel
Save