TestController.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace App\Http\Controllers\Admin;
  3. use App\Models\Notification;
  4. use App\Models\Project;
  5. use App\Models\User;
  6. use App\Models\UserAuth;
  7. use App\Models\WorkPoint;
  8. use Illuminate\Http\Request;
  9. class TestController extends Controller
  10. {
  11. public function index(Request $request)
  12. {
  13. dd(mb_substr('你好', 0, 1));
  14. // $info = Notification::orderBy('id', 'desc')->first();
  15. // dd($info->sendOfficialInfo());
  16. // return false;
  17. // $user = User::where('phone', '13438082119')->first();
  18. // User::where('phone', 'like', '%1343808211%')->update([
  19. // 'open_id' => $user->open_id,
  20. // 'union_id' => $user->union_id,
  21. // 'official_open_id' => $user->official_open_id
  22. // ]);
  23. // dd(User::where('phone', 'like', '%1343808211%')->pluck('union_id'));
  24. // $app = app('wechat.official_account.default');
  25. // $res = $app->template_message->send([
  26. // 'touser' => 'oEDlJ5p8EFuHepjBi0cASmHjb7Qg',
  27. // 'template_id' => 'dlRsvUWqeziBvGbdT89b69slvZll6gZVRCotIXCwwjM',
  28. // 'miniprogram' => [
  29. // 'appid' => 'xxxxxxx',
  30. // 'pagepath' => 'pages/xxx',
  31. // ],
  32. // 'data' => [
  33. // 'first' => '您有一条待审核的订单,请注意查看!',
  34. // 'keyword1' => '2010-01-01',
  35. // 'keyword2' => '设备租赁订单',
  36. // 'keyword3' => '待审核/机电负责人',
  37. // 'keyword4' => 'XX-项目',
  38. // 'keyword5' => 'XXXXXX',
  39. // 'remark' => '点击进入小程序查看详情,请及时处理。',
  40. // ],
  41. // ]);
  42. // dd($res);
  43. }
  44. }