mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 01:21:23 +03:30
24 lines
468 B
PHP
24 lines
468 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Package extends Model
|
|
{
|
|
public $fillable = ['name', 'unique_id', 'user_id', 'note', 'verified'];
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
public function items()
|
|
{
|
|
return $this->belongsToMany('App\Item', 'item_package');
|
|
}
|
|
public function packs()
|
|
{
|
|
return $this->belongsToMany('App\Pack', 'pack_package');
|
|
}
|
|
|
|
}
|