PHPackages                             mlsolutions/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. mlsolutions/sanctum-tokens

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

mlsolutions/sanctum-tokens
==========================

A Laravel Nova resource tool for sanctum tokens.

v1.0.3(4mo ago)01.0k↑166.7%MITVuePHP ^8.1|^8.2|^8.3|^8.4

Since Jul 17Pushed 4mo agoCompare

[ Source](https://github.com/ml-solutions-ltda/sanctum-tokens)[ Packagist](https://packagist.org/packages/mlsolutions/sanctum-tokens)[ RSS](/packages/mlsolutions-sanctum-tokens/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Create a Sanctum Personal Access Tokens in Nova With ID UUID
============================================================

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

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 mlsolutions/sanctum-tokens
```

```
php artisan vendor:publish --provider="MlSolutions\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 MlSolutions\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 MlSolutions\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 MlSolutions\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

43

—

FairBetter than 91% of packages

Maintenance74

Regular maintenance activity

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% 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 ~51 days

Total

4

Last Release

146d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b895f8c44bd74d8ad19241803acb2f5763db593c608314de8ec07700e79796eb?d=identicon)[luissobrinho](/maintainers/luissobrinho)

---

Top Contributors

[![gerasart](https://avatars.githubusercontent.com/u/8726693?v=4)](https://github.com/gerasart "gerasart (8 commits)")[![luissobrinho](https://avatars.githubusercontent.com/u/17295212?v=4)](https://github.com/luissobrinho "luissobrinho (4 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/mlsolutions-sanctum-tokens/health.svg)

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

###  Alternatives

[vyuldashev/nova-permission

A Laravel Nova tool for Spatie's Permission library.

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

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

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

A Laravel Nova resource tool for sanctum tokens.

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

A Laravel Nova tool for Spatie's Permission library.

791.1M3](/packages/kiritokatklian-nova-permission)[sereny/nova-permissions

Laravel Nova - Roles &amp; Permissions

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

Nova Two Factor Authentication

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

PHPackages © 2026

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