Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
f957b20f
...
f957b20fe5ad6ab3b951b9b8c3ff5e35cc35db02
authored
2021-06-29 14:38:32 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
*
1 parent
eab6d6c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
app/Exceptions/Handler.php
app/Helper/Response.php
app/Http/Requests/Admin/MusicianWithdrawRequest.php
config/app.php
app/Exceptions/Handler.php
View file @
f957b20
...
...
@@ -2,7 +2,10 @@
namespace
App\Exceptions
;
use
App\Helper\ErrorCode
;
use
App\Helper\Response
;
use
Illuminate\Foundation\Exceptions\Handler
as
ExceptionHandler
;
use
Illuminate\Validation\ValidationException
;
use
Throwable
;
class
Handler
extends
ExceptionHandler
...
...
@@ -38,4 +41,6 @@ class Handler extends ExceptionHandler
//
});
}
}
...
...
app/Helper/Response.php
View file @
f957b20
...
...
@@ -30,9 +30,12 @@ class Response
* @param int $code
* @return mixed
*/
public
static
function
error
(
$code
=
ErrorCode
::
SERVER_ERROR
)
public
static
function
error
(
$code
=
ErrorCode
::
SERVER_ERROR
,
string
$msg
=
''
)
{
return
response
()
->
json
([
'code'
=>
$code
,
'msg'
=>
ErrorCode
::
$messages
[
$code
]
??
ErrorCode
::
$messages
[
ErrorCode
::
SERVER_ERROR
]]);
return
response
()
->
json
([
'code'
=>
$code
,
'msg'
=>
$msg
??
(
ErrorCode
::
$messages
[
$code
]
??
ErrorCode
::
$messages
[
ErrorCode
::
SERVER_ERROR
])
]);
}
/**
...
...
app/Http/Requests/Admin/MusicianWithdrawRequest.php
View file @
f957b20
...
...
@@ -35,8 +35,8 @@ class MusicianWithdrawRequest extends FormRequest
public
function
messages
()
:
array
{
return
[
'order_id.required'
=>
'
订单号不存在
'
,
'status.required'
=>
'
审核状态错误
'
,
'order_id.required'
=>
'
缺少订单号
'
,
'status.required'
=>
'
缺少审核状态
'
,
'status.in'
=>
'审核状态错误'
,
];
}
...
...
config/app.php
View file @
f957b20
...
...
@@ -67,7 +67,7 @@ return [
|
*/
'timezone'
=>
'
UT
C'
,
'timezone'
=>
'
PR
C'
,
/*
|--------------------------------------------------------------------------
...
...
Please
register
or
sign in
to post a comment