PHPackages                             elshaden/apiato-sanctum - 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. [Framework](/categories/framework)
4. /
5. elshaden/apiato-sanctum

ActiveApiato-container[Framework](/categories/framework)

elshaden/apiato-sanctum
=======================

Implementation of Laravel Sanctum in Apiato Projects .

2.0.3(7mo ago)62.0k1MITPHP

Since Apr 30Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/Elshaden/apiato-sanctum)[ Packagist](https://packagist.org/packages/elshaden/apiato-sanctum)[ RSS](/packages/elshaden-apiato-sanctum/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

[Apiato](https://github.com/apiato/apiato) [Sanctum](https://laravel.com/docs/9.x/sanctum)
==========================================================================================

[](#apiato-sanctum)

### Implementation of Laravel Sanctum in Apiato.

[](#implementation-of-laravel-sanctum-in-apiato)

#### This Container is used to make use of Laravel Sanctum Authentication

[](#this-container-is-used-to-make-use-of-laravel-sanctum-authentication)

### Installation

[](#installation)

Only Works in Existing Apiato Application
Read more about the Apiato container installer in the [docs](http://apiato.io/docs/miscellaneous/container-installer)!

### Note

[](#note)

#### using Sanctum will limit the use of existing Laravel Passport in Apiato, I have not tested it with both but you should not use both at the same time.

[](#using-sanctum-will-limit-the-use-of-existing-laravel-passport-in-apiato-i-have-not-tested-it-with-both-but--you-should-not-use-both-at-the-same-time)

\#### Version 2.0 Has Been Updated to support Sanctum 3.0 #### Steps to Install > You should have fully installed working Apiato including Passport.

> To Install Sanctum in Existing Apiato Application
>
> ```
> composer require elshaden/apiato-sanctum
>
> ```

> You need To Change the ***use HasApiTokens*** in the ***App\\Ship\\Parents\\Models\\UserModel*** to ***use Sanctum Trait***
>
> ```
> use Laravel\Sanctum\HasApiTokens;
>
> ```

> php artisan migrate ***this will create the sanctum\_personal\_access\_token*** table

> and you are ready to go

> Check sanctum config file in Configs Dir for any changes

> You can have a look at the routes to understand how to use the Sanctum in Apiato

> To use the Sanctum middleware you need to change the middleware in your routes to
>
> ```
>     ->middleware(['auth:sanctum'])
>
> ```

#### Use of Sanctum abilities has not been implemented yet. You can add abilities to Sanctum and use in Apiato. You will need to see the Sanctum [docs](https://laravel.com/docs/9.x/sanctum) for more info.

[](#use-of-sanctum-abilities-has-not-been-implemented-yet-you-can-add-abilities-to-sanctum-and-use-in-apiato-you-will-need-to-see-the-sanctum-docs-for-more-info)

#### I personally prefer using the existing permissions' system in Apiato with Sanctum.

[](#i-personally-prefer-using-the-existing-permissions-system-in-apiato-with-sanctum)

#### Sanctum will work with existing Permissions and Roles as you would expect with Passport.

[](#sanctum-will-work-with-existing-permissions-and-roles-as-you-would-expect-with-passport)

Sanctum uses web guard, there is no need to create a sanctum guard.
-------------------------------------------------------------------

[](#sanctum-uses-web-guard-there-is-no-need-to-create-a-sanctum-guard)

### Note: when seeding existing users, permissions or anythng that uses the guard name you need to skip adding sanctum guard

[](#note-when-seeding-existing-users-permissions-or-anythng-that-uses-the-guard-name-you-need-to-skip-adding-sanctum-guard)

`if($guardName == 'sanctum') continue;`

Thanks for using Apiato-Sanctum
-------------------------------

[](#thanks-for-using-apiato-sanctum)

#### I welcome any feedback, questions or suggestions.

[](#i-welcome-any-feedback-questions-or-suggestions)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance63

Regular maintenance activity

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~104 days

Recently: every ~293 days

Total

13

Last Release

224d ago

Major Versions

0.0.6 → 1.0.12022-05-12

1.0.3 → 2.02022-10-15

2.0.3 → v4.x-dev2025-10-01

### Community

Maintainers

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

---

Top Contributors

[![Elshaden](https://avatars.githubusercontent.com/u/33955172?v=4)](https://github.com/Elshaden "Elshaden (16 commits)")

---

Tags

apiframeworkauthsanctumapiatolaravel-sanctumSPAAutenticator

### Embed Badge

![Health badge](/badges/elshaden-apiato-sanctum/health.svg)

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

###  Alternatives

[apiato/apiato

A flawless framework for building scalable and testable API-Centric Apps with PHP and Laravel.

3.1k31.8k](/packages/apiato-apiato)[digitalstars/simplevk

Powerful PHP library/framework for VK API bots, supporting LongPoll &amp; Callback &amp; OAuth

883.9k3](/packages/digitalstars-simplevk)[psx/psx

PHP REST API Framework

17112.6k3](/packages/psx-psx)

PHPackages © 2026

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