diff --git a/src/Widgets/Classes/FaqWidget.php b/src/Widgets/Classes/FaqWidget.php index ce3ec31..6eb48f4 100644 --- a/src/Widgets/Classes/FaqWidget.php +++ b/src/Widgets/Classes/FaqWidget.php @@ -28,7 +28,7 @@ public function form(): Builder\Block ->required() ->options( // @phpstan-ignore-next-line - \LaraZeus\Sky\SkyPlugin::get()->getTagModel()::query() + \LaraZeus\Sky\SkyPlugin::get()->getModel('Tag')::query() ->where('type', 'faq') ->get() ->pluck('name', 'slug') diff --git a/src/Widgets/Classes/LibraryWidget.php b/src/Widgets/Classes/LibraryWidget.php index 476b365..7b19061 100644 --- a/src/Widgets/Classes/LibraryWidget.php +++ b/src/Widgets/Classes/LibraryWidget.php @@ -28,7 +28,7 @@ public function form(): Builder\Block ->required() ->options( // @phpstan-ignore-next-line - \LaraZeus\Sky\SkyPlugin::get()->getTagModel()::query() + \LaraZeus\Sky\SkyPlugin::get()->getModel('Tag')::query() ->where('type', 'library') ->get() ->pluck('name', 'slug') diff --git a/src/Widgets/Classes/PostsWidget.php b/src/Widgets/Classes/PostsWidget.php index 957ce0c..97150ba 100644 --- a/src/Widgets/Classes/PostsWidget.php +++ b/src/Widgets/Classes/PostsWidget.php @@ -46,7 +46,7 @@ public function form(): Builder\Block Select::make('category') // @phpstan-ignore-next-line - ->options(\LaraZeus\Sky\SkyPlugin::get()->getTagModel()::query() + ->options(\LaraZeus\Sky\SkyPlugin::get()->getModel('Tag')::query() ->withType('category') ->pluck('name', 'id')), @@ -61,11 +61,11 @@ public function form(): Builder\Block public function viewData(array $data): array { // @phpstan-ignore-next-line - $posts = \LaraZeus\Sky\SkyPlugin::get()->getPostModel()::query(); + $posts = \LaraZeus\Sky\SkyPlugin::get()->getModel('Post')::query(); if ($data['category'] !== null) { // @phpstan-ignore-next-line - $category = \LaraZeus\Sky\SkyPlugin::get()->getTagModel()::where('type', 'category')->find($data['category']); + $category = \LaraZeus\Sky\SkyPlugin::get()->getModel('Tag')::where('type', 'category')->find($data['category']); if ($category !== null) { $posts = $category->postsPublished(); }