mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 20:31:05 +03:30
24 lines
476 B
PHP
24 lines
476 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Package extends Model
|
|
{
|
|
public $fillable = ['name', 'unique_id', 'user_id', 'result', 'description'];
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
public function items()
|
|
{
|
|
return $this->belongsToMany('App\Item', 'item_package');
|
|
}
|
|
public function cycles()
|
|
{
|
|
return $this->belongsToMany('App\Cycle', 'cycle_package');
|
|
}
|
|
|
|
}
|