Commit a33de7a8 authored by zhoujun's avatar zhoujun

非硬核渠道开启

parent 2f130955
Pipeline #1812 passed with stage
in 1 second
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use PDOException;
use RedisException;
use Illuminate\Support\Facades\Redis;
use App\Http\Controllers\Controller;
class CheckController extends Controller
{
public function getCheckDB()
{
$dbNames = ['mysql' => '用户中心数据库库','wx_mysql'=>'明信片库'];
foreach ($dbNames as $key => $val) {
try {
DB::connection($key)->getPdo();
} catch (PDOException $e) {
return response('阿拉德明信片(uc_card):' . $val . '连接失败(' . $key . ')<br>' . $e->getMessage(), 500);
}
}
try {
Redis::connection('default');
}catch(RedisException $e) {
return response('阿拉德明信片(uc_card):redis连接失败(default)<br>' . $e->getMessage(), 500);
}
return response('OK');
}
}
\ No newline at end of file
...@@ -163,5 +163,4 @@ return [ ...@@ -163,5 +163,4 @@ return [
], ],
], ],
]; ];
<?php <?php
return [ return [
'channel' => ['xy','i4','hw','oppo','vivo','jinli','meizu','kupai','mg2hc'], 'channel' => ['xy','i4','hw','oppo','vivo','jinli','meizu','kupai','mg2hc','baidu','xiaomi','mg2other'],
'date' => '2021-05-28 00:00:00', 'date' => '2021-05-28 00:00:00',
'sign' =>[ 'sign' =>[
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
| contains the 'web' middleware group. Now create something great! | contains the 'web' middleware group. Now create something great!
| |
*/ */
Route::get('check/db', 'CheckController@getCheckDB');
Route::any('/wx/home','HomeController@getIndex')->name('wxIndex'); Route::any('/wx/home','HomeController@getIndex')->name('wxIndex');
Route::any('/404','HomeController@getError'); Route::any('/404','HomeController@getError');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment