Giter VIP home page Giter VIP logo

nova-passport-access-tokens's Introduction

Nova Passport Access Token Manager

Manage Laravel Passport personal access tokens.

Requirements

Installation

  1. composer require "64robots/nova-passport-access-tokens:*"
  2. Add the tool to your app\Providers\NovaServiceProvider.php:

     public function tools()
     {
         return [
             // ...
             new R64\NovaPassportAccessTokens\NovaPassportAccessToken\NovaPassportAccessToken,
         ];
     }
  3. Implement R64\NovaPassportAccessTokens\NovaIssuableToken in your App\Models\Users

namespace App\Models\User;
use Illuminate\Database\Eloquent\Collection;


class User extends Authenticatable implements NovaIssuableToken
{

    public static function getForNova(): Collection 
    {
        //
    }

}
  1. Implement R64\NovaPassportAccessTokens\ScopeForNova in your App\Models\Token
namespace App\Models\Token;
use R64\NovaPassportAccessTokens\ScopeForNova;

class Token extends \Laravel\Passport\Token implements ScopeForNova
{
    public function scopeForNova($query)
    {
        //
    }
}
  1. Use App\Models\Token in AppServiceProvider
namespace App\Providers;

use App\Models\Token;
use Illuminate\Support\ServiceProvider;
use Laravel\Passport\Passport;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        Passport::useTokenModel(Token::class);
    }
}

Usage

Nova Tools

Passport Management

Screen Shot 2019-08-22 at 4 55 38 PM

nova-passport-access-tokens's People

Contributors

michalgallovic avatar lacasera avatar

Watchers

James Cloos avatar  avatar  avatar Robert Preston avatar Javier Martinez avatar Mohamed Benhida avatar

Forkers

revenly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.