Skip to content

Commit

Permalink
'cause the size (case) matters
Browse files Browse the repository at this point in the history
  • Loading branch information
slruslan authored Apr 20, 2017
1 parent d8ef112 commit b7659bf
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/CustomCasts.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@

trait CustomCasts
{
/**
* Get the type of cast for a model attribute.
*
* @param string $key
* @return string
*/
protected function getCastType($key)
{
return ($this->getCasts()[$key]);
}


/**
* Cast an attribute to a native PHP type.
*
Expand Down Expand Up @@ -126,4 +138,4 @@ protected function toClass($class, $value)

return unserialize($value);
}
}
}

0 comments on commit b7659bf

Please sign in to comment.