Skip to content

Commit

Permalink
#31 refactor: move get base model method to base model files
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Jan 13, 2025
1 parent 59765fd commit 7733f37
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 21 deletions.
4 changes: 4 additions & 0 deletions src/Models/Base/BaseCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

class BaseCategory extends BotbleCategory
{
public static function getBaseModel(): string
{
return 'Botble\Page\Models\Category';
}
}
4 changes: 4 additions & 0 deletions src/Models/Base/BaseMetaBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

class BaseMetaBox extends BotbleMetaBox
{
public static function getBaseModel(): string
{
return 'Botble\Base\Models\MetaBox';
}
}
4 changes: 4 additions & 0 deletions src/Models/Base/BasePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

class BasePage extends BotblePage
{
public static function getBaseModel(): string
{
return 'Botble\Page\Models\Page';
}
}
4 changes: 4 additions & 0 deletions src/Models/Base/BasePost.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

class BasePost extends BotblePost
{
public static function getBaseModel(): string
{
return 'Botble\Blog\Models\Post';
}
}
4 changes: 4 additions & 0 deletions src/Models/Base/BaseTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

class BaseTag extends BotbleTag
{
public static function getBaseModel(): string
{
return 'Botble\Blog\Models\Tag';
}
}
4 changes: 0 additions & 4 deletions src/Models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,4 @@
#[AllowDynamicProperties]
class Category extends BaseCategory
{
public static function getBaseModel(): string
{
return 'Botble\Page\Models\Category';
}
}
5 changes: 0 additions & 5 deletions src/Models/MetaBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,4 @@ class MetaBox extends BaseMetaBox
'reference_id',
'reference_type',
];

public static function getBaseModel(): string
{
return 'Botble\Base\Models\MetaBox';
}
}
4 changes: 0 additions & 4 deletions src/Models/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,4 @@
#[AllowDynamicProperties]
class Page extends BasePage
{
public static function getBaseModel(): string
{
return 'Botble\Page\Models\Page';
}
}
4 changes: 0 additions & 4 deletions src/Models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,4 @@
#[AllowDynamicProperties]
class Post extends BasePost
{
public static function getBaseModel(): string
{
return 'Botble\Blog\Models\Post';
}
}
4 changes: 0 additions & 4 deletions src/Models/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,4 @@
#[AllowDynamicProperties]
class Tag extends BaseTag
{
public static function getBaseModel(): string
{
return 'Botble\Blog\Models\Tag';
}
}

0 comments on commit 7733f37

Please sign in to comment.