Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: `Undefined variable $service` when creating a new service

peaklabs-dev11769f059fdd
diff --git a/app/View/Components/services/advanced.php b/app/View/Components/services/advanced.php
index 7e68c6dda5..8104eaad49 100644
--- a/app/View/Components/services/advanced.php
+++ b/app/View/Components/services/advanced.php
@@ -2,6 +2,7 @@
namespace App\View\Components\services;
+use App\Models\Service;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
@@ -11,10 +12,9 @@ class advanced extends Component
/**
* Create a new component instance.
*/
- public function __construct()
- {
- //
- }
+ public function __construct(
+ public ?Service $service = null
+ ) {}
/**
* Get the view / contents that represent the component.