/var/www/hkosl.com/imusiccircle/webadmin/models/InventoryTxn.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

use Illuminate\Database\Capsule\Manager as DB;
use 
Carbon\Carbon as Carbon;

class 
InventoryTxn extends BaseModel{
    protected 
$table "inventory_txn";

    public function 
inventory(){
        return 
$this->belongsTo('Inventory');
    }

    public function 
from_warehouse(){
        return 
$this->belongsTo('Warehouse''from_warehouse_id');
    }

    public function 
to_warehouse(){
        return 
$this->belongsTo('Warehouse''to_warehouse_id');
    }

    public function 
document(){
        return 
$this->morphTo();
    }
}