Add ability to pass in parameters to an Award class #155

This commit is contained in:
Nabeel Shahzad
2018-03-17 11:35:34 -05:00
parent 26f00ccaae
commit 7feecb507d
8 changed files with 90 additions and 33 deletions

View File

@@ -12,6 +12,24 @@ class Utils extends Facade
return 'utils';
}
/**
* Simple check on the first character if it's an object or not
* @param $obj
* @return bool
*/
public static function isObject($obj)
{
if(!$obj) {
return false;
}
if($obj[0] === '{' || $obj[0] === '[') {
return true;
}
return false;
}
/**
* Download a URI. If a file is given, it will save the downloaded
* content into that file