add pack and update items & packegs & cycles

This commit is contained in:
Fayyazi
2019-09-07 13:49:04 +04:30
parent 3522700605
commit 976e4c075b
39 changed files with 628 additions and 111 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
class Package extends Model
{
public $fillable = ['name', 'unique_id', 'user_id', 'result', 'description'];
public $fillable = ['name', 'unique_id', 'user_id', 'note', 'verified'];
public function user()
{
return $this->belongsTo('App\User');
@@ -15,9 +15,9 @@ class Package extends Model
{
return $this->belongsToMany('App\Item', 'item_package');
}
public function cycles()
public function packes()
{
return $this->belongsToMany('App\Cycle', 'cycle_package');
return $this->belongsToMany('App\Pack', 'pack_package');
}
}