HelpService.php 900 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2018/11/7
  6. * Time: 14:17
  7. */
  8. namespace App\Services\Content;
  9. use App\Repositories\HelpRepository;
  10. class HelpService
  11. {
  12. protected $helpRepository;
  13. /**
  14. * HelpService constructor.
  15. * @param $helpRepository
  16. */
  17. public function __construct(HelpRepository $helpRepository)
  18. {
  19. $this->helpRepository = $helpRepository;
  20. }
  21. public function getHelpsByType($id, $page)
  22. {
  23. if ($id && intval($id)>0) {
  24. $lists = $this->helpRepository->getHelpsByType($id, $page);
  25. }
  26. return $lists;
  27. }
  28. public function getHelps($where, $page)
  29. {
  30. $lists = $this->helpRepository->getHelps($where, $page);
  31. return $lists;
  32. }
  33. public function getHelp($where)
  34. {
  35. $lists = $this->helpRepository->getHelpInfo($where);
  36. return $lists;
  37. }
  38. }