lupka/nova-laravel-api-logger

A Laravel Nova tool.

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 1

Open Issues: 0

Language:Vue

pkg:composer/lupka/nova-laravel-api-logger

0.1.0 2020-01-22 06:57 UTC

This package is auto-updated.

Last update: 2025-09-22 19:50:42 UTC


README

Installation

You can install the package via Composer:

composer require lupka/nova-laravel-api-logger

The package will automatically register its service provider.

If you haven't done the setup for the lupka/laravel-api-logger package, you'll need to do that first. Then, add the following to your NovaServiceProvider.php:

use Lupka\NovaLaravelApiLogger\NovaLaravelApiLogger;

...

public function tools()
{
    return [
        ...
        new NovaLaravelApiLogger,
    ];
}

If you want to restrict who can see the logs (a common use case for me has been restricting this to admins/developers), use the canSee method when adding the tool to restrict by email address (or any other criteria you have set up).

(new NovaLaravelApiLogger)->canSee(function ($request) {
    return in_array($request->user()->email, ['alex@alexchalupka.com']);
}),