Files
nexusphp/app/Models/Bookmark.php

22 lines
361 B
PHP
Raw Normal View History

2021-12-14 16:22:03 +08:00
<?php
namespace App\Models;
class Bookmark extends NexusModel
{
protected $table = 'bookmarks';
protected $fillable = ['userid', 'torrentid'];
2022-03-26 16:09:39 +08:00
public function torrent()
{
return $this->belongsTo(Torrent::class, 'torrentid');
}
public function user()
{
return $this->belongsTo(Torrent::class, 'userid');
}
2021-12-14 16:22:03 +08:00
}