mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 17:58:59 +00:00
Update Release and PreDb models relationship
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2017-10-08 DariusIII
|
||||
* Chg: Update Release and PreDb models relationship
|
||||
* Chg: Update symfony components
|
||||
2017-10-07 DariusIII
|
||||
* Chg: Fix user list
|
||||
|
||||
+10
-16
@@ -4,6 +4,10 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @property mixed $release
|
||||
* @property mixed $hash
|
||||
*/
|
||||
class Predb extends Model
|
||||
{
|
||||
/**
|
||||
@@ -24,25 +28,15 @@ class Predb extends Model
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'title',
|
||||
'nfo',
|
||||
'size',
|
||||
'category',
|
||||
'predate',
|
||||
'source',
|
||||
'requestid',
|
||||
'groups_id',
|
||||
'nuked',
|
||||
'nukereason',
|
||||
'files',
|
||||
'filename',
|
||||
'searched',
|
||||
];
|
||||
protected $guarded = [];
|
||||
|
||||
public function hash()
|
||||
{
|
||||
return $this->hasMany('App\Models\PredbHash', 'predb_id');
|
||||
}
|
||||
|
||||
public function release()
|
||||
{
|
||||
return $this->hasMany('App\Models\Release', 'predb_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,4 +45,9 @@ class Release extends Model
|
||||
{
|
||||
return $this->belongsTo('App\Models\Category', 'categories_id');
|
||||
}
|
||||
|
||||
public function predb()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Predb', 'predb_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user