Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11 Support #296

Open
AmmadGetlicensed opened this issue Mar 13, 2024 · 3 comments
Open

Laravel 11 Support #296

AmmadGetlicensed opened this issue Mar 13, 2024 · 3 comments

Comments

@AmmadGetlicensed
Copy link

Please make support for Laravel 11, right now its not compatible.

@tarreislam
Copy link

++

@tarreislam
Copy link

bump

I have made my own temporary solution, not ideal but works, remember to make it protected by a middleware

    public function showLaravelLogs()
    {
        $deleteAllFiles = \Request::get('delete-all-files') == "true";
        $path = storage_path('logs');
        $files = \File::allFiles($path);

        if (!$deleteAllFiles) {
            echo "<a href='?delete-all-files=true'>Remove all filez<a/>";
        }

        foreach ($files as $file) {
            $actualPath = $path . DIRECTORY_SEPARATOR . $file->getFilename();
            if ($deleteAllFiles) {
                unlink($actualPath);
                continue;
            }
            $path2Display = file_get_contents($actualPath);
            echo "<h1 style='display: block'>{$file->getFilename()}</h1>";
            echo "<div><pre>$path2Display</pre></div>";
        }

        if ($deleteAllFiles) {
            return redirect('/backoffice/logs');
        }

    }

@rap2hpoutre
Copy link
Owner

rap2hpoutre commented Mar 20, 2024

Thank you for your contribution!
I just released an updated version that accepts Laravel 11 (v2.4.0).
Let me know if there is any problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants