Updated some code [skip ci]

This commit is contained in:
James Cole
2015-06-05 13:39:24 +02:00
parent 62d5a1da87
commit 834b1afb38
13 changed files with 45 additions and 54 deletions

View File

@@ -75,26 +75,18 @@ class CacheProperties
foreach ($this->properties as $property) {
if ($property instanceof Collection || $property instanceof EloquentCollection) {
$this->md5 .= print_r($property->toArray(), true);
$this->md5 .= json_encode($property->toArray());
continue;
}
if ($property instanceof Carbon) {
$this->md5 .= $property->toRfc3339String();
continue;
}
if (is_array($property)) {
$this->md5 .= print_r($property, true);
continue;
}
if (is_object($property)) {
$this->md5 .= $property->__toString();
}
if (is_array($property)) {
$this->md5 .= print_r($property, true);
}
$this->md5 .= (string) $property;
$this->md5 .= json_encode($property);
}
$this->md5 = md5($this->md5);
@@ -107,4 +99,4 @@ class CacheProperties
{
Cache::forever($this->md5, $data);
}
}
}