$log_file = App\Files::makeFileIfNotExists(storage_path('debug.logs')); echo '<html><head><title>LOGS</title><style>div:hover{background-color:#403B1C;text-decoration:underline;}'; echo 'span{display:inline-block;font-size:11px;width:35px;color:#DBEAF9;}</style></head>'; echo '<body style="background-color:#272822;color:#C1EA4F;"><pre style="font-family:consolas;">'; $ctr = 1; foreach (file($log_file) as $line) { echo '<div><span>' . $ctr . '</span> ' . $line . '</div>'; $ctr++; } echo '</pre></body></html>'; }); // Backup logs to database and clear log file // Route::any('/backup/logs', function () { if (isset($_POST['xplogs_backup'])) { var_dump(App\Xplog::backup()); var_dump(App\Xplog::clear()); } else { echo ' <!DOCTYPE html> <html> <body> <form action="" method="post" > Backup wasabi logs:<br> <input type="submit" value="Backup" name="xplogs_backup"> <input type="hidden" name="_token" id="token" value="' . csrf_token() . '"> </form> </body> </html>'; } }); Route::get('/php/errors', function () {
function pinoy_time($_date_string, $_date_format = 'Y-m-d h:i:s A') { App\Xplog::pinoyTime($_date_string, $_date_format); }