Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Encore\Admin\Exception; use Illuminate\Support\MessageBag; use Illuminat..
Decoded Output download
<?php
namespace Encore\Admin\Exception;
use Illuminate\Support\MessageBag;
use Illuminate\Support\ViewErrorBag;
class Handler
{
/**
* Render exception.
*
* @param \Exception $exception
*
* @return string
*/
public static function renderException(\Exception $exception)
{
$error = new MessageBag([
'type' => get_class($exception),
'message' => $exception->getMessage(),
'file' => $exception->getFile(),
'line' => $exception->getLine(),
'trace' => $exception->getTraceAsString(),
]);
$errors = new ViewErrorBag();
$errors->put('exception', $error);
return view('admin::partials.exception', compact('errors'))->render();
}
/**
* Flash a error message to content.
*
* @param string $title
* @param string $message
*
* @return mixed
*/
public static function error($title = '', $message = '')
{
$error = new MessageBag(compact('title', 'message'));
return session()->flash('error', $error);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Encore\Admin\Exception;
use Illuminate\Support\MessageBag;
use Illuminate\Support\ViewErrorBag;
class Handler
{
/**
* Render exception.
*
* @param \Exception $exception
*
* @return string
*/
public static function renderException(\Exception $exception)
{
$error = new MessageBag([
'type' => get_class($exception),
'message' => $exception->getMessage(),
'file' => $exception->getFile(),
'line' => $exception->getLine(),
'trace' => $exception->getTraceAsString(),
]);
$errors = new ViewErrorBag();
$errors->put('exception', $error);
return view('admin::partials.exception', compact('errors'))->render();
}
/**
* Flash a error message to content.
*
* @param string $title
* @param string $message
*
* @return mixed
*/
public static function error($title = '', $message = '')
{
$error = new MessageBag(compact('title', 'message'));
return session()->flash('error', $error);
}
}
Function Calls
None |
Stats
MD5 | ce688af84aa76bd458ecfa49eae2455e |
Eval Count | 0 |
Decode Time | 81 ms |