src/Prettus/Repository/Traits/CacheableRepository.php
protected function serializeCriteria()
    {
        try {
            return serialize($this->getCriteria());
        } catch (Exception $e) {
            return serialize($this->getCriteria()->map(function ($criterion) {
                return $this->serializeCriterion($criterion);
            }));
        }
    }
protected function serializeCriteria()
    {
        try {
            return serialize($this->getCriteria());
        } catch (Exception $e) {
            return serialize($this->getCriteria()->map(function ($criterion) {
                return $this->serializeCriterion($criterion);
            }));
        }
    }
protected function serializeCriteria ( ) { try { return serialize ( $ this -> getCriteria ( ) ) ; } catch ( Exception $ e ) { return serialize ( $ this -> getCriteria ( ) -> map ( function ( $ criterion ) { return $ this -> serializeCriterion ( $ criterion ) ; } ) ) ; } }
Serialize the criteria making sure the Closures are taken care of.

@return string
Serialize the criteria making sure the Closures are taken care of .