|
|
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Api\v1;
|
|
|
use App\Http\Controllers\Api\BaseController;
|
|
|
use App\Http\Validator\ArticleValidator;
|
|
|
use App\Services\ArticleBooksService;
|
|
|
+use App\Services\ArticleCatesService;
|
|
|
use App\Services\ArticleService;
|
|
|
use App\Services\ConfigService;
|
|
|
use Illuminate\Http\Request;
|
|
|
@@ -29,6 +30,7 @@ class ArticleController extends BaseController
|
|
|
parent::__construct();
|
|
|
|
|
|
$this->service = new ArticleService();
|
|
|
+ $this->cateService = new ArticleCatesService();
|
|
|
$this->bookService = new ArticleBooksService();
|
|
|
}
|
|
|
|
|
|
@@ -72,6 +74,14 @@ class ArticleController extends BaseController
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 获取文章分类
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function cates(){
|
|
|
+ return $this->cateService->getOptions();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 单页文章内容
|
|
|
* @return array
|
|
|
*/
|