NoticeController.php 743 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Http\Models\Common;
  4. use Illuminate\Http\Request;
  5. use App\Http\Controllers\Controller;
  6. use App\Models;
  7. class NoticeController extends Controller
  8. {
  9. /*
  10. * 系统公告
  11. */
  12. public function notice(Request $req){
  13. $Notice = new Models\Notice;
  14. $data = $Notice->notice_info();
  15. if(!$data){
  16. return toJson(-1);
  17. }
  18. return toJson(1,'',$data);
  19. }
  20. // 测试redis消息队列方法
  21. public function cs(){
  22. $msg = ['恭喜aa用户中奖1000元','恭喜bb用户中奖1000元','恭喜cc用户中奖1000元'];
  23. Common::addNotification($msg);
  24. // $get = Common::getNotification();
  25. // dump($get);die;
  26. }
  27. }