From d13fc38b824207dffb8e1986b2d8815b091029ac Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Wed, 13 Sep 2023 13:55:41 +0300 Subject: [PATCH] fix get model --- src/Filament/Pages/Importer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Filament/Pages/Importer.php b/src/Filament/Pages/Importer.php index cbee319..c3b7b2c 100755 --- a/src/Filament/Pages/Importer.php +++ b/src/Filament/Pages/Importer.php @@ -41,13 +41,13 @@ public function submit() } if ($this->truncate) { - $posts = SkyPlugin::get()->getPostModel()::get(); + $posts = SkyPlugin::get()->getModel('Post')::get(); $posts->each(function ($item, $key) { $item->tags()->detach(); $item->delete(); }); Schema::disableForeignKeyConstraints(); - SkyPlugin::get()->getTagModel()::truncate(); + SkyPlugin::get()->getModel('Tag')::truncate(); Schema::enableForeignKeyConstraints(); Notification::make() @@ -77,7 +77,7 @@ public function submit() public function savePost($post) { - $zeusPost = SkyPlugin::get()->getPostModel()::findOrNew($post->ID); + $zeusPost = SkyPlugin::get()->getModel('Post')::findOrNew($post->ID); if (! $zeusPost->exists || $this->overwrite) { $zeusPost->id = $post->ID; $zeusPost->title = $post->post_title;