2018-09-25 13:30:50 +02:00
|
|
|
<?php namespace BookStack\Actions;
|
|
|
|
|
|
|
|
use BookStack\Model;
|
2021-05-16 01:29:56 +02:00
|
|
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
2015-11-21 18:22:14 +01:00
|
|
|
|
|
|
|
class View extends Model
|
|
|
|
{
|
|
|
|
|
|
|
|
protected $fillable = ['user_id', 'views'];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all owning viewable models.
|
|
|
|
*/
|
2021-05-16 01:29:56 +02:00
|
|
|
public function viewable(): MorphTo
|
2015-11-21 18:22:14 +01:00
|
|
|
{
|
|
|
|
return $this->morphTo();
|
|
|
|
}
|
|
|
|
}
|