Update Release and PreDb models relationship

This commit is contained in:
DariusIII
2017-10-08 23:43:09 +02:00
parent 85dc024bdf
commit 83aca2bcd3
3 changed files with 16 additions and 16 deletions
+1
View File
@@ -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
View File
@@ -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');
}
}
+5
View File
@@ -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');
}
}