mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Added filtering to activity lists. Fixes #14.
This commit is contained in:
@ -44,15 +44,4 @@ class Entity extends Model
|
||||
return $this->morphMany('Oxbow\Activity', 'entity')->orderBy('created_at', 'desc');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets only the most recent activity
|
||||
* @param int $limit
|
||||
* @param int $page
|
||||
* @return mixed
|
||||
*/
|
||||
public function recentActivity($limit = 20, $page=0)
|
||||
{
|
||||
return $this->activity()->skip($limit*$page)->take($limit)->get();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user