niveshsaharan/laravel-passport

Laravel Passport Tool for Nova

0.1.0 2019-08-01 06:13 UTC

This package is auto-updated.

Last update: 2024-04-29 04:07:18 UTC


README

A custom tool to manage Passport API keys in Nova

preview

Installation

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

composer require niveshsaharan/laravel-passport

Then, register your new link in the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvider.php

[..]
use Niveshsaharan\LaravelPassport\LaravelPassport;

class NovaServiceProvider extends NovaApplicationServiceProvider
{

[..]

public function tools()
{
    return [
        // ...
        (new LaravelPassport())->canSee(function ($request) {
                return true; //$request->user()->isAdmin();
        }),
    ];
}

[..]

}