lupka / nova-laravel-api-logger
A Laravel Nova tool.
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Language:Vue
Requires
- php: >=7.1.0
- lupka/laravel-api-logger: ^0.1
This package is auto-updated.
Last update: 2024-10-22 17:19:32 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']); }),