This commit is contained in:
Richard Dern
2022-01-12 00:35:37 +01:00
commit 400e3d01f1
1363 changed files with 57778 additions and 0 deletions

49
app/Models/Bookmark.php Executable file
View File

@@ -0,0 +1,49 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\Pivot;
/**
* Link between a folder (belonging to a user) and a document.
*/
class Bookmark extends Pivot
{
// -------------------------------------------------------------------------
// ----| Properties |-------------------------------------------------------
// -------------------------------------------------------------------------
/**
* Name of the table storing bookmarks.
*
* @var string
*/
public $table = 'bookmarks';
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = true;
// -------------------------------------------------------------------------
// ----| Relations |--------------------------------------------------------
// -------------------------------------------------------------------------
/**
* Associated document.
*/
public function document()
{
return $this->belongsTo(Document::class);
}
/**
* Associated folder.
*/
public function folder()
{
return $this->belongsTo(Folder::class);
}
}