|
@@ -0,0 +1,53 @@
|
|
|
|
+<?php
|
|
|
|
+namespace App\Http\Controllers;
|
|
|
|
+use App\Models\ConfigStoreType;
|
|
|
|
+use App\Transformers\ConfigStoreTypeTransformer;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Created by PhpStorm.
|
|
|
|
+ * User: qinyaer
|
|
|
|
+ * Date: 2019/4/23
|
|
|
|
+ * Time: 下午3:56
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+class StoreTypeController extends BaseController
|
|
|
|
+{
|
|
|
|
+ /**
|
|
|
|
+ * @api {get} /storeType/index 储存方式列表
|
|
|
|
+ * @apiVersion 0.1
|
|
|
|
+ * @apiName StoreType index
|
|
|
|
+ * @apiGroup StoreType
|
|
|
|
+ * @apiPermission none
|
|
|
|
+ * @apiSuccessExample 成功响应:
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ "data": [],
|
|
|
|
+ "extra": {
|
|
|
|
+ "filters": [
|
|
|
|
+ "筛选字段1",
|
|
|
|
+ "筛选字段2"
|
|
|
|
+ ],
|
|
|
|
+ "columns": [
|
|
|
|
+ "id",
|
|
|
|
+ "name"
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ "meta": {
|
|
|
|
+ "pagination": {
|
|
|
|
+ "total": 2,
|
|
|
|
+ "count": 2,
|
|
|
|
+ "per_page": 15,
|
|
|
|
+ "current_page": 1,
|
|
|
|
+ "total_pages": 1,
|
|
|
|
+ "links": []
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ */
|
|
|
|
+ public function index()
|
|
|
|
+ {
|
|
|
|
+ $ConfigStoreType = ConfigStoreType::orderBy('id', 'desc')
|
|
|
|
+ ->paginate();
|
|
|
|
+
|
|
|
|
+ return $this->response->paginator($ConfigStoreType, new ConfigStoreTypeTransformer());
|
|
|
|
+ }
|
|
|
|
+}
|