Skip to content

Commit

Permalink
Merge pull request #33 from lara-zeus/fix-nav
Browse files Browse the repository at this point in the history
fix nav
  • Loading branch information
atmonshi authored Nov 2, 2023
2 parents 31e6dc6 + c58acf3 commit 403d909
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Widgets/Classes/MenuWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Tabs;
use LaraZeus\Rain\Widgets\Widget;
use LaraZeus\Sky\SkyPlugin;

class MenuWidget extends Widget implements \LaraZeus\Rain\Contracts\Widget
{
Expand All @@ -28,8 +29,7 @@ public function form(): Builder\Block
Select::make('menu_slug')
->required()
->options(
// @phpstan-ignore-next-line
\RyanChandler\FilamentNavigation\Models\Navigation::pluck('name', 'handle')
SkyPlugin::get()->getModel('Navigation')::pluck('name', 'handle')
),
Select::make('menu_dir')
->default('vertical')
Expand All @@ -46,8 +46,7 @@ public function form(): Builder\Block
public function viewData(array $data): array
{
return [
// @phpstan-ignore-next-line
'menu' => ($data['menu_slug'] !== null) ? \RyanChandler\FilamentNavigation\Models\Navigation::fromHandle($data['menu_slug']) : null,
'menu' => ($data['menu_slug'] !== null) ? SkyPlugin::get()->getModel('Navigation')::fromHandle($data['menu_slug']) : null,
];
}
}

0 comments on commit 403d909

Please sign in to comment.