Update Status model

pull/547/head
Daniel Supernault 7 years ago
parent cba743bb5b
commit 6d907414d1
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -103,8 +103,10 @@ class Status extends Model
public function liked() : bool
{
if(Auth::check() == false) {
return false;
}
$profile = Auth::user()->profile;
return Like::whereProfileId($profile->id)->whereStatusId($this->id)->count();
}
@ -130,6 +132,9 @@ class Status extends Model
public function shared() : bool
{
if(Auth::check() == false) {
return false;
}
$profile = Auth::user()->profile;
return self::whereProfileId($profile->id)->whereReblogOfId($this->id)->count();

Loading…
Cancel
Save