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

Started addition of favourite system

This commit is contained in:
Dan Brown
2021-05-16 00:29:56 +01:00
parent 7a059a5e90
commit bf8e7f3393
13 changed files with 190 additions and 4 deletions

17
app/Actions/Favourite.php Normal file
View File

@ -0,0 +1,17 @@
<?php namespace BookStack\Actions;
use BookStack\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class Favourite extends Model
{
protected $fillable = ['user_id'];
/**
* Get the related model that can be favourited.
*/
public function favouritable(): MorphTo
{
return $this->morphTo();
}
}