2020-03-18 10:40:15 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Utils\Traits;
|
|
|
|
|
|
|
|
use App\Utils\Ninja;
|
|
|
|
use App\Utils\SystemHealth;
|
|
|
|
|
|
|
|
trait AppSetup
|
|
|
|
{
|
2020-03-21 06:37:30 +01:00
|
|
|
public function checkAppSetup()
|
|
|
|
{
|
2020-03-26 04:23:57 +01:00
|
|
|
if (Ninja::isNinja()) { // Is this the invoice ninja production system?
|
|
|
|
return Ninja::isNinja();
|
2020-03-21 06:37:30 +01:00
|
|
|
}
|
2020-03-26 04:23:57 +01:00
|
|
|
|
|
|
|
$check = SystemHealth::check();
|
2020-03-18 10:40:15 +01:00
|
|
|
|
2020-06-28 12:32:18 +02:00
|
|
|
return $check['system_health'] == "true";
|
2020-03-18 10:40:15 +01:00
|
|
|
}
|
2020-03-21 06:37:30 +01:00
|
|
|
}
|