Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local> Reviewed-on: #15
This commit was merged in pull request #15.
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App;
|
||||
class Feature
|
||||
{
|
||||
const PEMBIAYAAN_ONLINE = 'pembiayaan_online';
|
||||
const REBET_ANNUR = 'rebet_annur';
|
||||
|
||||
/**
|
||||
* Known flag keys. New features: add a constant here, then INSERT rows for pilot kodcaw.
|
||||
@@ -15,6 +16,7 @@ class Feature
|
||||
{
|
||||
return [
|
||||
self::PEMBIAYAAN_ONLINE,
|
||||
self::REBET_ANNUR,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -40,9 +42,32 @@ class Feature
|
||||
{
|
||||
return [
|
||||
self::PEMBIAYAAN_ONLINE => 'Pembiayaan Online',
|
||||
self::REBET_ANNUR => 'Rebet / diskaun Annur',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Lelong portal base URL for this branch. rebet_annur branches (Annur/Tampoi)
|
||||
* use API_ARRAHNBID_ANNUR; everyone else uses API_ARRAHNBID.
|
||||
*
|
||||
* Always returned with a trailing slash so callers can append 'portalApi'.
|
||||
*
|
||||
* @param string $kodcaw
|
||||
* @return string
|
||||
*/
|
||||
public static function arrahnbidUrl($kodcaw)
|
||||
{
|
||||
$url = config('app_parameter.api_arrahnbid');
|
||||
if ($kodcaw && self::enabled($kodcaw, self::REBET_ANNUR)) {
|
||||
$annur = config('app_parameter.api_arrahnbid_annur');
|
||||
if ($annur) {
|
||||
$url = $annur;
|
||||
}
|
||||
}
|
||||
|
||||
return rtrim((string) $url, '/') . '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Missing row is off (fail closed).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user