1. Go to this page and download the library: Download stepanenko3/nova-logs-tool library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stepanenko3 / nova-logs-tool example snippets
// in app/Providers/NovaServiceProvder.php
// ...
public function tools()
{
return [
// ...
new \Stepanenko3\LogsTool\LogsTool(),
];
}
// 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 \Stepanenko3\LogsTool\LogsTool())
->canSee(fn () => auth()->user()->canSee())
->canDownload(fn () => auth()->user()->canDownload())
->canDelete(fn () => true),
];
}