app/Api/V1/Controllers/GoodController.php
/**
     * validate that given warehouse is in db
     */
validate that given warehouse is in db
validate that given warehouse is in db
protected function validateWarehouse(string $warehouse)
    {
        $warehouse = strtolower($warehouse);
        if ($warehouse_id = (new Warehouse)->isValidWarehouse($warehouse)) {
            return $warehouse_id;
        }
        return false;
    }
protected function validateWarehouse ( string $ warehouse ) { $ warehouse = strtolower ( $ warehouse ) ; if ( $ warehouse_id = ( new Warehouse ) -> isValidWarehouse ( $ warehouse ) ) { return $ warehouse_id ; } return false ; }
validate that given warehouse is in db
validate that given warehouse is in db