belongsTo(Customer::class, 'customer_id')->select('id', 'name', 'code_customer', 'lot_no'); } public function warehouse() { return $this->belongsTo(m_warehouse::class, 'warehouse_id')->select('id', 'name', 'address'); } public function tipe_peti() { return $this->belongsTo(Type_peti::class, 'tipe_peti_id')->select('id', 'type', 'size_peti', 'description'); } public function kondisipeti() { return $this->belongsTo(Kondisi_Peti::class, 'kondisipeti_id')->select('id', 'nama_kondisi', 'deskripsi_kondisi'); } public function transfer() { return $this->hasOne(Transfer::class, 'peti_id'); } // proses pengambilan data public function assetStatuses() { return $this->hasMany(asset_status::class, 'peti_id'); } }