TestController.php 860 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Http\Controllers\Admin;
  3. use App\Models\Project;
  4. use App\Models\User;
  5. use App\Models\UserAuth;
  6. use App\Models\WorkPoint;
  7. use Illuminate\Http\Request;
  8. class TestController extends Controller
  9. {
  10. public function index(Request $request)
  11. {
  12. // dd(User::where('phone', '13438082119')->first());
  13. $app = app('wechat.mini_program');
  14. $res = $app->template_message->send([
  15. 'touser' => 'oi4-45JF9_U6EuttPyvDjpV_yuC0',
  16. 'template_id' => 'UxFg6zf47Gmha84hNzbdTJ3K0UHzcXNMPUbJQj-ivA8',
  17. 'page' => 'index',
  18. 'data' => [
  19. 'character_string13' => '编号',
  20. 'thing6' => '内容',
  21. 'phrase12' => '状态',
  22. 'thing22' => '工区',
  23. 'thing15' => '备注',
  24. ],
  25. ]);
  26. dd($res);
  27. }
  28. }