diff --git a/resources/views/navigation/group.blade.php b/resources/views/navigation/group.blade.php index 42924a32..fc35efbd 100644 --- a/resources/views/navigation/group.blade.php +++ b/resources/views/navigation/group.blade.php @@ -11,6 +11,8 @@ ->whereDoesntStartWith('wire:model') }}> @foreach ($navigation->items() as $item) + {{ $item->state() }} + navigation->fill([ + 'schema' => $this->navigation(), + ]); + } + + public function navigation(): array { - return NavigationGroup::make(); + return []; } } diff --git a/src/Navigation/Contracts/HasNavigation.php b/src/Navigation/Contracts/HasNavigation.php index 5eae0a9e..174b36ab 100644 --- a/src/Navigation/Contracts/HasNavigation.php +++ b/src/Navigation/Contracts/HasNavigation.php @@ -2,9 +2,9 @@ namespace Foxws\WireUse\Navigation\Contracts; -use Foxws\WireUse\Navigation\Support\NavigationGroup; +use Foxws\WireUse\Navigation\Support\Navigation; interface HasNavigation { - public function navigation(): NavigationGroup; + // public function navigation(): array; } diff --git a/src/Navigation/Support/Navigation.php b/src/Navigation/Support/Navigation.php new file mode 100644 index 00000000..893b948d --- /dev/null +++ b/src/Navigation/Support/Navigation.php @@ -0,0 +1,10 @@ +toArray(); + } + + public static function fromLivewire($value): static + { + return new static($value); + } }