PHPackages                             serafim/railt-authorization - 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. serafim/railt-authorization

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

serafim/railt-authorization
===========================

Railt authorization extension for Laravel Framework

02PHP

Since Mar 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/SerafimArts/railt-authorization)[ Packagist](https://packagist.org/packages/serafim/railt-authorization)[ RSS](/packages/serafim-railt-authorization/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Railt Authorization
===================

[](#railt-authorization)

Your application should use the [Laravel Provider](https://github.com/railt/laravel-provider)

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

[](#installation)

- `composer require serafim/railt-authorization`
- Add into `config/railt.php`:

```
    ...
    'extensions' => [
        \Serafim\RailtAuthorization\AuthorizationExtension::class,
    ]
```

Usage
-----

[](#usage)

### Authenticated

[](#authenticated)

The field that contains the directive `@auth` is only available to an authenticated user.

```
type Example {
    field: Result! @auth
}
```

### Guest

[](#guest)

The field that contains the directive `@guest` is only available to a guest (non-authenticated user).

```
type Example {
    field: Result! @guest
}
```

### Authorization

[](#authorization)

The field that contains the directive `@can(role: String!)`:

1. Is only available to an authenticated user.
2. Should pass the authorization gate defined in `role` argument.

```
type Example {
    field: Result! @can(role: "some")
}
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150420?v=4)[Ruslan Sharipov](/maintainers/Serafim)[@serafim](https://github.com/serafim)

---

Top Contributors

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

---

Tags

authenticationauthrizationdirectivesextensiongraphqllaravelrailtroles

### Embed Badge

![Health badge](/badges/serafim-railt-authorization/health.svg)

```
[![Health](https://phpackages.com/badges/serafim-railt-authorization/health.svg)](https://phpackages.com/packages/serafim-railt-authorization)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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