| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | <?php/** * Created by PhpStorm. * User: hp * Date: 2017/11/20 * Time: 16:17 */namespace App\Http\Controllers\Channel\Promotion;use App\Http\Controllers\Channel\BaseController;use App\Http\Controllers\Channel\Promotion\Transformers\OriginalGuidesTransformer;use App\Http\Controllers\Controller;use App\Modules\Promotion\Services\PromotionService;use DB;class OriginalGuidesController extends BaseController{    /**     * @apiDefine promotion 推广     */    /**     * @apiVersion 1.0.0     * @api {GET} promotion/originalGuides 获取原文引导列表     * @apiGroup promotion     * @apiName getPromotion0riginalGuides     * @apiSuccess {Number}  id  ID.     * @apiSuccess {String}  content 内容.     * @apiSuccessExample {json} Success-Response:     *     *     {     *         "code": 0,     *         "msg": "",     *     *         "data": [     *           {     *              "id": 1,     *              "content": "sfsd"     *            },     *           {     *              "id": 2,     *              "content": "sfsd"     *            }     *        ]     *     }     */    function getPromotion0riginalGuides()    {        $promotionOriginalGuidesResult = PromotionService::getAllOriginalGuides();        return response()->collection(new OriginalGuidesTransformer(), $promotionOriginalGuidesResult);    }}
 |