PHPackages                             metasync-site/sanctum-tokens - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. metasync-site/sanctum-tokens

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

metasync-site/sanctum-tokens
============================

A Laravel Nova resource tool for sanctum tokens.

1.0.2(1y ago)328.6k↓14%1MITVuePHP ^8.1|^8.2|^8.3|^8.4

Since Mar 20Pushed 1y ago2 watchersCompare

[ Source](https://github.com/metasyncSite/sanctum-tokens)[ Packagist](https://packagist.org/packages/metasync-site/sanctum-tokens)[ RSS](/packages/metasync-site-sanctum-tokens/feed)WikiDiscussions main Synced 4d ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Create a Sanctum Personal Access Tokens in Nova
===============================================

[](#create-a-sanctum-personal-access-tokens-in-nova)

This package allows you to use [Sanctum](https://laravel.com/docs/12.x/sanctum) to generate a Personal Access Tokens in [Nova](https://nova.laravel.com/).

Screenshot
----------

[](#screenshot)

[![View without any tokens](./screenshots/p1.png)](./screenshots/p1.png)[![Create Token View](./screenshots/p2.png)](./screenshots/p2.png)[![Post Create Token View](./screenshots/p3.png)](./screenshots/p3.png)[![View with single token](./screenshots/p6.png)](./screenshots/p6.png)[![Revoke Token Prompt](./screenshots/p4.png)](./screenshots/p4.png)[![Show exist token](./screenshots/p5.png)](./screenshots/p5.png)

Prerequisites
-------------

[](#prerequisites)

1. [Install and Configure Sanctum](https://laravel.com/docs/12.x/sanctum#installation)
2. [Have Laravel Nova](https://nova.laravel.com/)
    - Support - Nova 4.x | Nova 5.x
    - Laravel 10.x | 11.x | 12.x

Installation
------------

[](#installation)

```
composer require metasync-site/sanctum-tokens
```

```
php artisan vendor:publish --provider="MetasyncSite\SanctumTokens\ToolServiceProvider" --tag="sanctum-tokens-migrations"
```

```
php artisan migrate
```

Register the plugin by adding `SanctumTokens::make()` to the array of fields in the Nova resource. Make sure the `HasApiTokens` trait from the Sanctum package has been added to your model.

```
use MetasyncSite\SanctumTokens\SanctumTokens;

public function fields(Request $request)
{
    return [
        SanctumTokens::make(),
    ];
}
```

Features
--------

[](#features)

### Hide Abilities

[](#hide-abilities)

You can hide the reference to the token abilities from the UI by calling the `hideAbilities()` method on the field.

```
use MetasyncSite\SanctumTokens\SanctumTokens;

public function fields(Request $request)
{
    return [
        SanctumTokens::make()->hideAbilities(),
    ];
}
```

### Set Default Abilities

[](#set-default-abilities)

If you don't want to use the default `*` token ability you can set your own by simply passing an array of strings to the `defaultAbilities()` method on the field.

This works well with the the `hideAbilities()` method if you want to hide the abilities logic from your users.

```
use MetasyncSite\SanctumTokens\SanctumTokens;

public function fields(Request $request)
{
    return [
        SanctumTokens::make()->defaultAbilities(['crm', 'cms']),
    ];
}
```

### Localization

[](#localization)

Publish the package language files to your application's `resources/lang/vendor` directory:

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance44

Moderate activity, may be stable

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Total

3

Last Release

453d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d463f04fe31693ccfacd94a07abaae0d45a680b0895afc579138b83e5a13364?d=identicon)[metasyncSite](/maintainers/metasyncSite)

---

Top Contributors

[![gerasart](https://avatars.githubusercontent.com/u/8726693?v=4)](https://github.com/gerasart "gerasart (8 commits)")[![metasyncSite](https://avatars.githubusercontent.com/u/157399850?v=4)](https://github.com/metasyncSite "metasyncSite (1 commits)")

---

Tags

laravelsanctumnova

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/metasync-site-sanctum-tokens/health.svg)

```
[![Health](https://phpackages.com/badges/metasync-site-sanctum-tokens/health.svg)](https://phpackages.com/packages/metasync-site-sanctum-tokens)
```

###  Alternatives

[vyuldashev/nova-permission

A Laravel Nova tool for Spatie's Permission library.

4302.6M3](/packages/vyuldashev-nova-permission)[kabbouchi/nova-impersonate

A Laravel Nova field allows you to authenticate as your users.

2342.2M](/packages/kabbouchi-nova-impersonate)[jeffbeltran/sanctum-tokens

A Laravel Nova resource tool for sanctum tokens.

56592.3k](/packages/jeffbeltran-sanctum-tokens)[kiritokatklian/nova-permission

A Laravel Nova tool for Spatie's Permission library.

791.2M4](/packages/kiritokatklian-nova-permission)[sereny/nova-permissions

Laravel Nova - Roles &amp; Permissions

87455.9k1](/packages/sereny-nova-permissions)[visanduma/nova-two-factor

Nova Two Factor Authentication

58665.0k](/packages/visanduma-nova-two-factor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
