PlatformContentController.php 827 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Http\Controllers\V2;
  3. use App\Http\Controllers\BaseController;
  4. use App\Repositories\PlatformContentRepository;
  5. use Illuminate\Http\Request;
  6. /**
  7. * Created by PhpStorm.
  8. * User: durong
  9. * Date: 2019/6/17
  10. * Time: 下午6:42
  11. */
  12. class PlatformContentController extends BaseController
  13. {
  14. public function __construct(PlatformContentRepository $platformContentRepository)
  15. {
  16. $this->platformContentRepository = $platformContentRepository;
  17. }
  18. //平台内容列表
  19. public function index(Request $request)
  20. {
  21. $platformContent = $this->platformContentRepository->index($request->all());
  22. if ($platformContent){
  23. return $this->jsonSuccess($platformContent);
  24. }else {
  25. return $this->jsonError('没有找到相关平台内容');
  26. }
  27. }
  28. }