kabbouchi/nova-logs-tool

A Laravel Nova tool to manage and keep track of each one of your logs files.

v0.1.4 2019-11-15 10:28 UTC

README

Latest Version on Packagist Total Downloads

A Laravel Nova tool to manage and keep track of each one of your logs files.

screenshot of the backup tool

Behind the scenes kabbouchi/laravel-ward is used.

Installation

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

composer require kabbouchi/nova-logs-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 \KABBOUCHI\LogsTool\LogsTool(),
    ];
}

Authorization

// in app/Providers/NovaServiceProvder.php

// ...

public function tools()
{
    return [
        // ...
        (new \KABBOUCHI\LogsTool\LogsTool())
                ->canSee(function ($request) {
                    return true;
                })
                ->canDownload(function ($request) {
                    return true;
                })
                ->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.