123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Models\Notification;
- use App\Models\Project;
- use App\Models\User;
- use App\Models\UserAuth;
- use App\Models\WorkPoint;
- use Illuminate\Http\Request;
- class TestController extends Controller
- {
- public function index(Request $request)
- {
- dd(mb_substr('你好', 0, 1));
- // $info = Notification::orderBy('id', 'desc')->first();
- // dd($info->sendOfficialInfo());
- // return false;
- // $user = User::where('phone', '13438082119')->first();
- // User::where('phone', 'like', '%1343808211%')->update([
- // 'open_id' => $user->open_id,
- // 'union_id' => $user->union_id,
- // 'official_open_id' => $user->official_open_id
- // ]);
- // dd(User::where('phone', 'like', '%1343808211%')->pluck('union_id'));
- // $app = app('wechat.official_account.default');
- // $res = $app->template_message->send([
- // 'touser' => 'oEDlJ5p8EFuHepjBi0cASmHjb7Qg',
- // 'template_id' => 'dlRsvUWqeziBvGbdT89b69slvZll6gZVRCotIXCwwjM',
- // 'miniprogram' => [
- // 'appid' => 'xxxxxxx',
- // 'pagepath' => 'pages/xxx',
- // ],
- // 'data' => [
- // 'first' => '您有一条待审核的订单,请注意查看!',
- // 'keyword1' => '2010-01-01',
- // 'keyword2' => '设备租赁订单',
- // 'keyword3' => '待审核/机电负责人',
- // 'keyword4' => 'XX-项目',
- // 'keyword5' => 'XXXXXX',
- // 'remark' => '点击进入小程序查看详情,请及时处理。',
- // ],
- // ]);
- // dd($res);
- }
- }
|