This commit is contained in:
mahdi purHosseini
2024-02-11 12:21:01 +03:30
parent 87c4cf428f
commit 8f885f6888
3 changed files with 10 additions and 8 deletions
+5
View File
@@ -14,6 +14,11 @@ class Item extends Model implements HasMedia
public $fillable = [ 'name' , 'size' , 'unique_id' , 'specific' , 'note' , 'user_id' , 'udi' , 'status' , 'repair' , 'package_id' , 'creator_id' ];
public function scopeIsNotRepaired($query)
{
return $query->where( 'repair' , 0 );
}
public function package()
{
return $this->belongsTo( 'App\Package' );