arrowsgm/nova-phpinfo

A Laravel Nova PHP info tool.

v0.1.0 2020-09-15 10:08 UTC

This package is auto-updated.

Last update: 2024-04-29 04:28:10 UTC


README

Installation

Install the package via Composer in any Laravel app using Nova:

composer require arrowsgm/nova-phpinfo

Register the tool with Nova in the tools method of your NovaServiceProvider:

// in app/Providers/NovaServiceProvider.php
//...
use Arrowsgm\NovaPhpinfo\NovaPhpinfo;
use Laravel\Nova\NovaApplicationServiceProvider;
//...
class NovaServiceProvider extends NovaApplicationServiceProvider {
    //...
    public function tools()
    {
        return [
            //...
            new NovaPhpinfo,
            //...
        ];
    }
    //...
}

You can apply policy to this tool like so:

    //...
    public function tools()
    {
        return [
            //...
            (new NovaPhpinfo())->canSee(function ($request) {
                return $request->user->can('manage-users');
            }),
            //...
        ];
    }
    //...