Add more API resources; user bid management and tests #35 #36

This commit is contained in:
Nabeel Shahzad
2017-12-12 16:58:27 -06:00
parent 5b25a464ba
commit 248a8d1488
27 changed files with 470 additions and 166 deletions

View File

@@ -6,12 +6,21 @@ use \Illuminate\Support\Facades\Facade;
class Utils extends Facade
{
protected static function getFacadeAccessor()
{
return 'utils';
}
/**
* Returns a 40 character API key that a user can use
* @return string
*/
public static function generateApiKey()
{
$key = sha1(time() . mt_rand());
return $key;
}
/**
* Convert seconds to an array of hours, minutes, seconds
* @param $seconds