update cycle

This commit is contained in:
Fayyazi
2019-09-17 12:01:30 +04:30
parent a14ee80603
commit 2a83f7931b
5 changed files with 26 additions and 21 deletions
+2 -2
View File
@@ -6,12 +6,12 @@ use Illuminate\Database\Eloquent\Model;
class Cycle extends Model
{
public $fillable = ['name', 'date', 'user_id', 'sterilizer_id', 'note', 'verified'];
public $fillable = ['name', 'date', 'user_id', 'cycle_number', 'sterilizer_id', 'note', 'verified'];
public function user()
{
return $this->belongsTo('App\User');
}
public function packes()
public function packs()
{
return $this->belongsToMany('App\Pack', 'cycle_pack');
}