richard
/
cyca
Archived
1
0
Fork 0
This repository has been archived on 2024-05-04. You can view files and clone it, but cannot push or open issues or pull requests.
cyca/app/Models/Bookmark.php

50 lines
1.2 KiB
PHP
Executable File

<?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);
}
}