From 11769f059fddf5ce40b4941b2c8da1cdc7d7c76c Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:40:08 +0100 Subject: [PATCH] fix: `Undefined variable $service` when creating a new service --- app/View/Components/services/advanced.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/View/Components/services/advanced.php b/app/View/Components/services/advanced.php index 7e68c6dda..8104eaad4 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.