mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
commit
e24e25f9f0
@ -20,6 +20,7 @@ use App\Jobs\Util\VersionCheck;
|
||||
use App\Models\Account;
|
||||
use App\Utils\CurlUtils;
|
||||
use App\Utils\SystemHealth;
|
||||
use App\Utils\Traits\AppSetup;
|
||||
use DB;
|
||||
use Exception;
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
@ -37,6 +38,8 @@ use Spatie\Browsershot\Browsershot;
|
||||
*/
|
||||
class SetupController extends Controller
|
||||
{
|
||||
use AppSetup;
|
||||
|
||||
public function index()
|
||||
{
|
||||
$check = SystemHealth::check(false);
|
||||
@ -127,6 +130,8 @@ class SetupController extends Controller
|
||||
}
|
||||
|
||||
VersionCheck::dispatchNow();
|
||||
|
||||
$this->buildCache(true);
|
||||
|
||||
return redirect('/');
|
||||
} catch (Exception $e) {
|
||||
|
@ -36,22 +36,6 @@ class Gateway extends StaticModel
|
||||
|
||||
protected $dateFormat = 'Y-m-d H:i:s.u';
|
||||
|
||||
// /**
|
||||
// * @return mixed
|
||||
// * @deprecated 5.0.17 No longer needs as we are removing omnipay dependence
|
||||
// */
|
||||
// public function getFields()
|
||||
// {
|
||||
// if ($this->isCustom()) {
|
||||
// return [
|
||||
// 'name' => '',
|
||||
// 'text' => '',
|
||||
// ];
|
||||
// } else {
|
||||
// return Omnipay::create($this->provider)->getDefaultParameters();
|
||||
// }
|
||||
// }
|
||||
|
||||
public function getOptionsAttribute()
|
||||
{
|
||||
return $this->getMethods();
|
||||
|
@ -30,12 +30,12 @@ trait AppSetup
|
||||
return $check['system_health'] == 'true';
|
||||
}
|
||||
|
||||
public function buildCache()
|
||||
public function buildCache($force = false)
|
||||
{
|
||||
$cached_tables = config('ninja.cached_tables');
|
||||
|
||||
foreach ($cached_tables as $name => $class) {
|
||||
if (request()->has('clear_cache') || ! Cache::has($name)) {
|
||||
if (request()->has('clear_cache') || ! Cache::has($name) || $force) {
|
||||
|
||||
// check that the table exists in case the migration is pending
|
||||
if (! Schema::hasTable((new $class())->getTable())) {
|
||||
|
Loading…
Reference in New Issue
Block a user