for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sfneal\Casts;
use Carbon\Carbon;
use Exception;
use Vkovic\LaravelCustomCasts\CustomCastBase;
class CarbonCast extends CustomCastBase
{
/**
* Store value as time code string
*
* @param string $value
* @return string
*/
public function setAttribute($value)
return $value;
}
* Retrieve value as Carbon instance
* @return Carbon
* @throws Exception
public function castAttribute($value)
return (new Carbon($value));