CaiWuXiTong/app/Traits/Cloud.php
WuYongJie 9595267ee7
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 导入 Akaunting 初始源码与团队协作规则
2026-07-20 18:20:25 +08:00

48 lines
1.1 KiB
PHP

<?php
namespace App\Traits;
use App\Traits\Modules;
trait Cloud
{
use Modules;
public function getCloudRolesPageUrl($location = 'user')
{
if ($this->moduleIsEnabled('roles')) {
return route('roles.roles.index');
}
return route('apps.app.show', [
'alias' => 'roles',
'utm_source' => $location,
'utm_medium' => 'app',
'utm_campaign' => 'roles',
]);
}
public function getCloudBankFeedsUrl($location = 'widget')
{
if ($this->moduleIsEnabled('bank-feeds')) {
return route('bank-feeds.bank-connections.index');
}
return route('apps.app.show', [
'alias' => 'bank-feeds',
'utm_source' => $location,
'utm_medium' => 'app',
'utm_campaign' => 'bank_feeds',
]);
}
public function isCloud()
{
if (config('app.offline')) {
return false;
}
return request()->getHost() == config('cloud.host', 'app.akaunting.com');
}
}