Skip to content

Commit

Permalink
Applying patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Sik committed Aug 6, 2015
1 parent e33b04b commit ffe2453
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/app/Http/Transformers/EloquentModelTransformer.php
Expand Up @@ -81,13 +81,13 @@ public function transform($object)
*/
private function castAttribute($castTypes, $key, $value)
{
if(!array_key_exists($key, $castTypes)) {
if (!array_key_exists($key, $castTypes)) {
return $value;
}

$castType = $castTypes[$key];

if($value instanceof Carbon) {
if ($value instanceof Carbon) {
switch ($castType) {
case 'date':
return $value->format('Y-m-d');
Expand Down

0 comments on commit ffe2453

Please sign in to comment.