kabbouchi / nova-logs-tool
A Laravel Nova tool to manage and keep track of each one of your logs files.
Installs: 337 545
Dependents: 0
Suggesters: 0
Security: 0
Stars: 73
Watchers: 6
Forks: 17
Open Issues: 12
Language:Vue
Requires
- php: >=8
- kabbouchi/laravel-ward: ^0.6.0
- laravel/nova: ^4
Requires (Dev)
- orchestra/testbench: ^3.6
- phpunit/phpunit: 7.1
- dev-master
- v2.2.0
- v2.1.0
- v2.0.0
- v1.x-dev
- v1.1.0
- v1.0.0
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.0
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-dependabot/npm_and_yarn/chownr-1.1.4
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.7
- dev-dependabot/npm_and_yarn/url-parse-1.5.3
- dev-dependabot/npm_and_yarn/prismjs-1.25.0
- dev-analysis-qBZwrO
This package is auto-updated.
Last update: 2024-11-20 19:21:38 UTC
README
A Laravel Nova tool to manage and keep track of each one of your logs files.
Behind the scenes kabbouchi/laravel-ward is used.
You can disable
laravel-ward
routes by addingLOG_VIEWER_ENABLE_ROUTES=false
to.env
file
Installation
You can install the package in to a Laravel app that uses Nova via composer:
composer require kabbouchi/nova-logs-tool php artisan vendor:publish --tag=ward-assets --force
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 \KABBOUCHI\LogsTool\LogsTool(), ]; }
Publish the package configuration file.
php artisan vendor:publish --provider="KABBOUCHI\LogsTool\LogsToolServiceProvider"
Authorization
// in app/Providers/NovaServiceProvder.php // ... public function tools() { return [ // ... // don't return plain `true` value or anyone can see/download/delete the logs, make sure to check if user has permission. (new \KABBOUCHI\LogsTool\LogsTool()) ->canSee(function ($request) { return auth()->user()->canSee(); }) ->canDownload(function ($request) { return auth()->user()->canDownload(); }) ->canDelete(function ($request) { return false; }), ]; }
Usage
Click on the "nova-logs-tool" menu item in your Nova app to see the tool provided by this package.
Possible environment variables:
NOVA_LOGS_PER_PAGE=6 NOVA_LOGS_REGEX_FOR_FILES="/^laravel/"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
The MIT License (MIT). Please see License File for more information.