Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages

Installation Instructions

You can install the nova tool in to a Laravel app that uses Nova via composer:

composer require spatie/nova-tail-tool

Next up, you must register the tool with Nova. This is typically done in the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvder.php

// ...

public function tools()
{
   return [
        // ...
        new \Spatie\TailTool\TailTool(),
    ];
}

Usage

Click on the "Application log" menu item in your Nova app to see the log. Initially it will be empty. All new lines that are appended to the log will be shown.

Readme

A Laravel Nova tool to display the application log

Latest Version on Packagist Tests Total Downloads

Have you always wanted to see your application log in your Nova app? Now you can!

tail tool screenshot

You can see the tool in action in this video on YouTube.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

Version 4 requires PHP 8.4+, Laravel 13, and Nova 5.11.1+. Older PHP, Laravel, and Nova versions are no longer supported. See UPGRADING when upgrading from version 3.

Install the tool in a Laravel application with Nova already installed and authenticated:

composer require spatie/nova-tail-tool:^4.0

Next up, you must register the tool with Nova. This is typically done in the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvider.php

// ...

public function tools(): array
{
   return [
        // ...
        new \Spatie\TailTool\TailTool(),
    ];
}

Usage

Click "Application log" in Nova's menu. The tool listens for entries appended after you open the page, polling once per second. It reads the most recently modified .log file in storage/logs, including daily logs. Log rotation and truncation reset the cursor. Logs sent only to stderr or a remote service cannot be displayed.

Entries are displayed as plain text, including HTML. The browser keeps the latest 500,000 characters. Scrolling up stops automatic scrolling; "Scroll to bottom" resumes it. Failed requests show a connection message and retry automatically. Leaving the page stops polling.

Logs can contain sensitive information. Restrict access using Nova's canSee callback on the registered tool. The page and polling endpoint both enforce this callback and Nova authentication and authorization:

(new \Spatie\TailTool\TailTool)
    ->canSee(fn ($request) => $request->user()->can('viewApplicationLogs')),

The page is available at /nova/application-log, or under your configured Nova path.

Testing

composer test

The test suite uses Pest 5 and the real Nova package. Configure Composer's Nova repository credentials before running composer update. CI requires two repository or organization secrets:

  • NOVA_USERNAME: the Nova account email address.
  • NOVA_LICENSE_KEY: a license key entitled to download Nova 5.11.1.

The workflow configures Composer authentication from these secrets. No JSON secret is needed.

Building assets

npm ci
npm run build

Commit the rebuilt dist files. Applications using the package do not need Node.js. The Vue 3 components use Nova's own Vue runtime, with Vite replacing Laravel Mix.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Back to Top
Added 8 years ago
Last updated 2 Weeks Ago
Version 4.0.0
Nova Version ^5.11.1
Composer
spatie/nova-tail-tool
GitHub stars 119
Packagist downloads 130,499

Favorites

24 users favorited

Rating

5.00
(out of 5)
★★★★★
★★★★
★★★
★★
★
7 ratings

Author

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas