]> BookStack Code Mirror - bookstack/blob - app/Actions/Favourite.php
Added front-end toggle and testing of inline attachments
[bookstack] / app / Actions / Favourite.php
1 <?php namespace BookStack\Actions;
2
3 use BookStack\Model;
4 use Illuminate\Database\Eloquent\Relations\MorphTo;
5
6 class Favourite extends Model
7 {
8     protected $fillable = ['user_id'];
9
10     /**
11      * Get the related model that can be favourited.
12      */
13     public function favouritable(): MorphTo
14     {
15         return $this->morphTo();
16     }
17 }