1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added view count tracking with personalised lists

This commit is contained in:
Dan Brown
2015-11-21 17:22:14 +00:00
parent 76eb8fc5d7
commit ea55b7f141
18 changed files with 311 additions and 30 deletions

20
app/View.php Normal file
View File

@ -0,0 +1,20 @@
<?php
namespace BookStack;
use Illuminate\Database\Eloquent\Model;
class View extends Model
{
protected $fillable = ['user_id', 'views'];
/**
* Get all owning viewable models.
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
*/
public function viewable()
{
return $this->morphTo();
}
}