NoticeController.php 724 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Http\Controllers\Deed;
  3. use App\Http\Controllers\Core\Auth;
  4. use App\Services\Deed\NoticeService;
  5. use Illuminate\Http\Request;
  6. use App\Http\Controllers\Controller;
  7. class NoticeController extends Controller
  8. {
  9. //
  10. public function readNotice()
  11. {
  12. $uid = Auth::auth();
  13. $notice = new NoticeService();
  14. $notice->readNotice($uid);
  15. return response()->json([
  16. 'code' => 200,
  17. 'message' => 'OK'
  18. ]);
  19. }
  20. public function subscribe()
  21. {
  22. $uid = Auth::auth();
  23. $ns = new NoticeService();
  24. $ns->subscribe($uid);
  25. return array(
  26. 'code' => 200,
  27. 'message' => 'success'
  28. );
  29. }
  30. }