function debug($msg) { $ip = $_SERVER["REMOTE_ADDR"]; $t = date("Y-m-D h:i:s"); $log_file = storage_path("tmp/debug.log"); if (is_array($msg)) { $msg = var_export($msg, true); } file_put_contents($log_file, "\n----------\n$t ($ip): $msg \n", FILE_APPEND); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter