mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
Update Status model
This commit is contained in:
parent
5d3b66f778
commit
4b0939cbfb
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue