Doc Blocks for settings

This commit is contained in:
David Bomba 2019-09-12 13:23:44 +10:00
parent a614dc5cda
commit 6368ab10f7
2 changed files with 17 additions and 1 deletions

View File

@ -145,6 +145,14 @@ class Client extends BaseModel
return $this->belongsTo(Currency::class);
}
/**
*
* Returns the entire filtered set
* of settings which have been merged from
* Client > Group > Company levels
*
* @return object stdClass object of settings
*/
public function getMergedSettings()
{
@ -160,6 +168,15 @@ class Client extends BaseModel
return ClientSettings::buildClientSettings(new CompanySettings($this->company->settings), new ClientSettings($this->settings));
}
/**
*
* Returns a single setting
* which cascades from
* Client > Group > Company
*
* @param string $setting The Setting parameter
* @return mixed The setting requested
*/
public function getSetting($setting)
{

View File

@ -124,7 +124,6 @@ class RecurringInvoiceTest extends TestCase
])->post('/api/v1/signup', $data);
$acc = $response->json();
Log::error($acc);
$account = Account::find($this->decodePrimaryKey($acc['data']['id']));
$company_token = $account->default_company->tokens()->first();