1
0
Fork 0

Update Status model

This commit is contained in:
Daniel Supernault 2018-08-10 01:06:05 -06:00
parent 5d3b66f778
commit 4b0939cbfb
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 3 additions and 0 deletions

View File

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