feat: add article and production modules
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace plugin\article\app\dao;
|
||||
|
||||
use core\base\BaseDao;
|
||||
use plugin\article\app\model\Content;
|
||||
|
||||
class ContentDao extends BaseDao
|
||||
{
|
||||
protected function setModel(): string
|
||||
{
|
||||
return Content::class;
|
||||
}
|
||||
|
||||
protected function getKeywordFields(): array
|
||||
{
|
||||
return ['title', 'slug', 'summary', 'content'];
|
||||
}
|
||||
|
||||
public function get($id, ?array $field = null, ?array $with = ['category', 'tags', 'createds', 'updateds'], string $order = '', ?array $withoutScopes = null): ?\Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
return parent::get($id, $field, $with, $order, $withoutScopes);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user