Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uc_card
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoujun
uc_card
Commits
a33de7a8
Commit
a33de7a8
authored
Jun 23, 2021
by
zhoujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
非硬核渠道开启
parent
2f130955
Pipeline
#1812
passed with stage
in 1 second
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
+35
-2
src/app/Http/Controllers/CheckController.php
src/app/Http/Controllers/CheckController.php
+32
-0
src/config/database.php
src/config/database.php
+0
-1
src/config/sign.php
src/config/sign.php
+1
-1
src/routes/web.php
src/routes/web.php
+2
-0
No files found.
src/app/Http/Controllers/CheckController.php
0 → 100644
View file @
a33de7a8
<?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
src/config/database.php
View file @
a33de7a8
...
...
@@ -163,5 +163,4 @@ return [
],
],
];
src/config/sign.php
View file @
a33de7a8
<?php
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'
,
'sign'
=>
[
...
...
src/routes/web.php
View file @
a33de7a8
...
...
@@ -10,6 +10,8 @@
| 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
(
'/404'
,
'HomeController@getError'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment