mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 18:11:05 +03:30
fix
This commit is contained in:
+19
-12
@@ -1,18 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Item extends Model
|
||||
{
|
||||
public $fillable = ['name', 'size', 'unique_id', 'specific', 'note', 'user_id'];
|
||||
public function packages()
|
||||
class Item extends Model
|
||||
{
|
||||
return $this->belongsToMany('App\Package', 'item_package')->withPivot('count');
|
||||
public $fillable = [ 'name' , 'size' , 'unique_id' , 'specific' , 'note' , 'user_id' , 'udi' , 'status' ];
|
||||
|
||||
public function packages()
|
||||
{
|
||||
return $this->belongsToMany( 'App\Package' , 'item_package' )->withPivot( 'count' );
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo( 'App\User' );
|
||||
}
|
||||
|
||||
public function files()
|
||||
{
|
||||
return $this->morphMany( 'App\Media' , 'model' );
|
||||
}
|
||||
}
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\User');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user