contract template endpoint

This commit is contained in:
glovetleong
2021-06-28 15:31:10 +08:00
parent 0be9350b30
commit ebdf9d57cc
16 changed files with 566 additions and 112 deletions
+10
View File
@@ -32,6 +32,16 @@ class General
return $data;
}
public static function returnNotFoundData()
{
$data = (object)[
'status' => false,
'errors' => [config('error_code.exist_error')]
];
return $data;
}
public static function returnErrorData($error = [])
{
$data = (object)[
+2 -2
View File
@@ -12,7 +12,7 @@ class Hasher
public static function encode($entity = '', ...$args)
{
$hash = new Hashids($entity, 11);
$hash = new Hashids($entity, 20);
return $hash->encode(...$args);
}
@@ -22,7 +22,7 @@ class Hasher
return $enc;
}
$hash = new Hashids($entity, 11);
$hash = new Hashids($entity, 20);
return $hash->decode($enc) ? $hash->decode($enc)[0] : '';
}