diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index a92929607..72893f974 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -27,7 +27,7 @@ public function waitlist() { } public function subscription() { - if (!is_cloud()) { + if (!isCloud()) { abort(404); } return view('subscription.index', [ @@ -37,7 +37,7 @@ public function subscription() public function license() { - if (!is_cloud()) { + if (!isCloud()) { abort(404); } return view('settings.license', [ diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 2e3b7f794..b01a2dd5e 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -12,7 +12,7 @@ class ServerController extends Controller public function new_server() { - if (!is_cloud()) { + if (!isCloud()) { return view('server.create', [ 'limit_reached' => false, 'private_keys' => PrivateKey::ownedByCurrentTeam()->get(), diff --git a/app/Http/Livewire/Boarding/Index.php b/app/Http/Livewire/Boarding/Index.php index 77afc1a92..35f7fd218 100644 --- a/app/Http/Livewire/Boarding/Index.php +++ b/app/Http/Livewire/Boarding/Index.php @@ -53,7 +53,7 @@ public function mount() } } public function welcome() { - if (is_cloud()) { + if (isCloud()) { return $this->setServerType('remote'); } $this->currentState = 'select-server-type'; diff --git a/app/Http/Livewire/Source/Github/Change.php b/app/Http/Livewire/Source/Github/Change.php index 4012386ae..32f84e8ed 100644 --- a/app/Http/Livewire/Source/Github/Change.php +++ b/app/Http/Livewire/Source/Github/Change.php @@ -37,7 +37,7 @@ class Change extends Component public function mount() { - if (is_cloud() && !isDev()) { + if (isCloud() && !isDev()) { $this->webhook_endpoint = config('app.url'); } else { $this->webhook_endpoint = $this->ipv4; diff --git a/app/Http/Middleware/IsSubscriptionValid.php b/app/Http/Middleware/IsSubscriptionValid.php index 01fa7a8d0..a9354e982 100644 --- a/app/Http/Middleware/IsSubscriptionValid.php +++ b/app/Http/Middleware/IsSubscriptionValid.php @@ -13,7 +13,7 @@ public function handle(Request $request, Closure $next): Response if (isInstanceAdmin()) { return $next($request); } - if (!auth()->user() || !is_cloud()) { + if (!auth()->user() || !isCloud()) { if ($request->path() === 'subscription') { return redirect('/'); } else { diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 96a798cdf..8eb557ec1 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -217,7 +217,7 @@ function isDev(): bool return config('app.env') === 'local'; } -function is_cloud(): bool +function isCloud(): bool { return !config('coolify.self_hosted'); } diff --git a/resources/views/auth/confirm-password.blade.php b/resources/views/auth/confirm-password.blade.php index 2cbc6dd72..dd1331d43 100644 --- a/resources/views/auth/confirm-password.blade.php +++ b/resources/views/auth/confirm-password.blade.php @@ -8,7 +8,7 @@