Add a Carbon helper function

This commit is contained in:
Jonny Barnes 2017-09-13 16:13:58 +01:00
parent 4057abb7e7
commit 27904658c6
3 changed files with 9 additions and 4 deletions

View file

@ -204,3 +204,10 @@ if (! function_exists('prettyPrintJson')) {
return str_replace("\t", ' ', $result);
}
}
// sourced from https://twitter.com/jrubsc/status/907776591320764416/photo/1
if (! function_exists('carbon')) {
function carbon(...$args) {
return new Carbon\Carbon(...$args);
}
}