PMCORE-3845 Check and made the recommend changes in the Laravel upgrade guide
This commit is contained in:
committed by
Mauricio Veliz
parent
6d1d7d752e
commit
d0c5a23d67
@@ -727,3 +727,14 @@ function calculateDate($iniDate, $timeUnit, $time)
|
||||
|
||||
return $datetime->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the constant value.
|
||||
* @param string $name
|
||||
* @param mixed $default
|
||||
* @return mixed
|
||||
*/
|
||||
function getConstant(string $name, $default = '')
|
||||
{
|
||||
return defined($name) === true ? constant($name) : $default;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user