Index.php 710 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace app\index\controller;
  3. use app\index\service\DaKaService;
  4. use think\Db;
  5. use think\Validate;
  6. class Index
  7. {
  8. public function index()
  9. {
  10. return 'index';
  11. }
  12. public function chatInfo() {
  13. }
  14. public function sendChatMsg() {
  15. $params = input();
  16. $rules = [
  17. 'userId' => 'require',
  18. 'otherUserId' => 'require',
  19. 'content' => 'require'
  20. ];
  21. new Validate($params);
  22. }
  23. public function chatList() {
  24. }
  25. public function hello($name = 'ThinkPHP5')
  26. {
  27. return 'hello,' . $name;
  28. }
  29. public function daka() {
  30. $service = new DaKaService();
  31. $service->run();
  32. }
  33. }