fix: Undefined variable $service when creating a new service

This commit is contained in:
peaklabs-dev
2025-01-14 12:40:08 +01:00
parent 9dca566ea8
commit 11769f059f

View File

@@ -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.