Files
nexusphp/app/Models/Bookmark.php
2022-03-26 16:09:39 +08:00

22 lines
361 B
PHP

<?php
namespace App\Models;
class Bookmark extends NexusModel
{
protected $table = 'bookmarks';
protected $fillable = ['userid', 'torrentid'];
public function torrent()
{
return $this->belongsTo(Torrent::class, 'torrentid');
}
public function user()
{
return $this->belongsTo(Torrent::class, 'userid');
}
}