xxxxxxxxxx
If Vue/Laravel project then run:
npm run watch
php artisan serve
xxxxxxxxxx
// Example code to read and dump Laravel log file
$logFile = storage_path('logs/laravel.log');
$logContents = file_get_contents($logFile);
echo $logContents;
xxxxxxxxxx
$logFile = storage_path('logs/laravel.log');
$logContent = file_get_contents($logFile);
// Extract the last few lines from the log
$logLines = explode("\n", $logContent);
$logLines = array_slice($logLines, -15); // Adjust the number of lines as needed
// Output the log lines
foreach ($logLines as $line) {
echo $line . "<br>";
}