Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120838987
Handler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Handler.php
View Options
<?php
namespace
App\Exceptions
;
use
Exception
;
use
Illuminate\Auth\AuthenticationException
;
use
Illuminate\Foundation\Exceptions\Handler
as
ExceptionHandler
;
use
Illuminate\Support\Facades\DB
;
class
Handler
extends
ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected
$dontReport
=
[
//
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected
$dontFlash
=
[
'password'
,
'password_confirmation'
,
];
/**
* Report or log an exception.
*
* @param \Exception $exception
*
* @return void
*/
public
function
report
(
Exception
$exception
)
{
parent
::
report
(
$exception
);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public
function
render
(
$request
,
Exception
$exception
)
{
// Rollback uncommitted transactions
while
(
DB
::
transactionLevel
()
>
0
)
{
DB
::
rollBack
();
}
return
parent
::
render
(
$request
,
$exception
);
}
/**
* Convert an authentication exception into a response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
*
* @return \Symfony\Component\HttpFoundation\Response
*/
protected
function
unauthenticated
(
$request
,
AuthenticationException
$exception
)
{
if
(
$request
->
expectsJson
())
{
return
response
()->
json
([
'message'
=>
$exception
->
getMessage
()],
401
);
}
abort
(
401
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 2:06 PM (1 w, 20 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fb/d2/09bd6569cb3ae1a3db7bb3abe2ac
Default Alt Text
Handler.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline