LikemeController.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace App\Http\Controllers\Share;
  3. use App\Http\Controllers\Controller;
  4. use App\Http\Controllers\Core\Auth;
  5. use App\Managers\LikeManager;
  6. class LikemeController extends Controller
  7. {
  8. /**
  9. * 检验邀请
  10. * @param int $invite_id
  11. * @return array
  12. * @throws \Exception
  13. * @deprecated Share/LikeMeCheck
  14. */
  15. public function check(int $invite_id)
  16. {
  17. $uid = Auth::auth();
  18. $lms = new LikeManager();
  19. $data = $lms->check($uid, $invite_id);
  20. return array(
  21. 'code' => 200,
  22. 'message' => 'success',
  23. 'data' => $data
  24. );
  25. }
  26. /**
  27. * 获取某个邀请的助力历史
  28. * @param int $invite_id
  29. * @return array
  30. * @deprecated Share/LikeMeHistory
  31. */
  32. public function history(int $invite_id)
  33. {
  34. $lms = new LikeManager();
  35. $data = $lms->history($invite_id);
  36. return array(
  37. 'code' => 200,
  38. 'message' => 'success',
  39. 'data' => $data
  40. );
  41. }
  42. /**
  43. * 获取分享详情
  44. * @param int $invite_id
  45. * @return array
  46. * @deprecated Share/LikeMe
  47. */
  48. public function get(int $invite_id)
  49. {
  50. $lms = new LikeManager();
  51. $data = $lms->get($invite_id);
  52. return array(
  53. 'code' => 200,
  54. 'message' => 'success',
  55. 'data' => $data
  56. );
  57. }
  58. }