Skip to content

Commit 0a0fcc9

Browse files
authored
Merge pull request #17 from lara-zeus/fix--get-model
fix get model
2 parents c517ceb + d13fc38 commit 0a0fcc9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Filament/Pages/Importer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ public function submit()
4141
}
4242

4343
if ($this->truncate) {
44-
$posts = SkyPlugin::get()->getPostModel()::get();
44+
$posts = SkyPlugin::get()->getModel('Post')::get();
4545
$posts->each(function ($item, $key) {
4646
$item->tags()->detach();
4747
$item->delete();
4848
});
4949
Schema::disableForeignKeyConstraints();
50-
SkyPlugin::get()->getTagModel()::truncate();
50+
SkyPlugin::get()->getModel('Tag')::truncate();
5151
Schema::enableForeignKeyConstraints();
5252

5353
Notification::make()
@@ -77,7 +77,7 @@ public function submit()
7777

7878
public function savePost($post)
7979
{
80-
$zeusPost = SkyPlugin::get()->getPostModel()::findOrNew($post->ID);
80+
$zeusPost = SkyPlugin::get()->getModel('Post')::findOrNew($post->ID);
8181
if (! $zeusPost->exists || $this->overwrite) {
8282
$zeusPost->id = $post->ID;
8383
$zeusPost->title = $post->post_title;

0 commit comments

Comments
 (0)