mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 02:11:05 +03:30
19 lines
393 B
PHP
19 lines
393 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Item extends Model
|
|
{
|
|
public $fillable = ['name', 'size', 'unique_id', 'specific', 'note', 'user_id'];
|
|
public function packages()
|
|
{
|
|
return $this->belongsToMany('App\Package', 'item_package')->withPivot('count');
|
|
}
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
}
|