Skip to content

ArroWsGM/nova-phpinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Nova tool to view PHP info

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');
            }),
            //...
        ];
    }
    //...