protected function checkIntegrity(ItemModel $item)
    {
        if ($item->department_id < 1) {
            $item->department()->associate($this->department);
        }

        if ($item->wastage_id < 1) {
            $item->wastage()->associate($this->wastage);
        }
    }
protected function checkIntegrity(ItemModel $item)
    {
        if ($item->department_id < 1) {
            $item->department()->associate($this->department);
        }

        if ($item->wastage_id < 1) {
            $item->wastage()->associate($this->wastage);
        }
    }
protected function checkIntegrity ( ItemModel $ item ) { if ( $ item -> department_id < 1 ) { $ item -> department ( ) -> associate ( $ this -> department ) ; } if ( $ item -> wastage_id < 1 ) { $ item -> wastage ( ) -> associate ( $ this -> wastage ) ; } }
Check the integrity of an item model. Add missing data if necessary.

@param  \REDACTED\Wastage\ItemModel $item

@return void
Check the integrity of an item model . Add missing data if necessary .