PHP code example of vkm-apps / x-error
1. Go to this page and download the library: Download vkm-apps/x-error library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vkm-apps / x-error example snippets
return response()->view($view, [
'code' => $code,
'title' => __("x-error::errors.$code.title"),
'message' => __("x-error::errors.$code.message"),
'color' => $color,
'exception' => $exception,
]);
'layout' => 'errors.custom', // Set to null to use default package layout
'exception' => [
'enabled' => false, // Set to true to enable stack trace outputs
'title' => 'Exception Details',
'permission' => null, // Permission
'colors' => [
'404' => 'text-blue-600 dark:text-blue-400',
'500' => 'text-red-600 dark:text-red-400',
'default' => 'text-zinc-600 dark:text-white',
],
'button' => [
'url' => '/', // Set to null to hide the button
'class' => 'px-20 py-2 border border-zinc-400 dark:border-zinc-500 rounded-md ...',
'text' => 'Home',
],
__("x-error::errors.{code}.title")
__("x-error::errors.{code}.message")
return [
'404' => [
'title' => 'Page Not Found',
'message' => 'The page you are looking for does not exist.',
],
];