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
84ab2230
...
84ab223098ff56d0cb011fa86a8d215f86bdf329
authored
2021-06-29 15:16:16 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
*
1 parent
f957b20f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
app/Exceptions/Handler.php
routes/admin.php
app/Exceptions/Handler.php
View file @
84ab223
...
...
@@ -5,6 +5,7 @@ namespace App\Exceptions;
use
App\Helper\ErrorCode
;
use
App\Helper\Response
;
use
Illuminate\Foundation\Exceptions\Handler
as
ExceptionHandler
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Validation\ValidationException
;
use
Throwable
;
...
...
@@ -16,7 +17,7 @@ class Handler extends ExceptionHandler
* @var array
*/
protected
$dontReport
=
[
//
ValidationException
::
class
];
/**
...
...
@@ -42,5 +43,30 @@ class Handler extends ExceptionHandler
});
}
/**
* @param Throwable $e
* @throws Throwable
*/
public
function
report
(
Throwable
$e
)
{
parent
::
report
(
$e
);
}
/**
* @param \Illuminate\Http\Request $request
* @param Throwable $e
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response
* @throws Throwable
*/
public
function
render
(
$request
,
Throwable
$e
)
{
if
(
$e
instanceof
ValidationException
)
{
Log
::
error
(
__METHOD__
,
[
'uri'
=>
$request
->
getUri
(),
'params'
=>
$request
->
all
(),
'err'
=>
$e
->
errors
()]);
return
Response
::
error
(
ErrorCode
::
ILLEGAL_PARAMS
,
$e
->
validator
->
errors
()
->
first
());
}
else
{
return
parent
::
render
(
$request
,
$e
);
// TODO: Change the autogenerated stub
}
}
}
...
...
routes/admin.php
View file @
84ab223
...
...
@@ -14,5 +14,5 @@ use Illuminate\Support\Facades\Route;
*/
Route
::
group
([],
function
(){
//提现审核通过
Route
::
pos
t
(
'musician/withdraw'
,
'MusicianWithdrawController@withdraw'
);
Route
::
ge
t
(
'musician/withdraw'
,
'MusicianWithdrawController@withdraw'
);
});
...
...
Please
register
or
sign in
to post a comment