PHPackages                             hyvor/helper-laravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hyvor/helper-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hyvor/helper-laravel
====================

Internal Package for HYVOR Applications

4.0.10(1mo ago)2584[4 PRs](https://github.com/hyvor/internal/pulls)MITPHPPHP &gt;=8.3CI passing

Since Dec 7Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/hyvor/internal)[ Packagist](https://packagist.org/packages/hyvor/helper-laravel)[ RSS](/packages/hyvor-helper-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (44)Versions (122)Used By (0)

internal
========

[](#internal)

This package provides the following features for HYVOR applications:

- Authentication: HYVOR and OpenID Connect
- Component API
- Billing API
- HTTP helpers
- Internationalization

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

[](#installation)

Install via composer:

```
composer require hyvor/internal
```

Include `./vendor/hyvor/internal/extension.neon` in your PHPStan config:

```
includes:
    - ./vendor/hyvor/internal/extension.neon
```

### Environment Variables

[](#environment-variables)

  ENV Description Default   `AUTH_METHOD`  **REQUIRED**. The API key of the HYVOR instance. This is used to fetch user data.  `test-key`   `HYVOR_INSTANCE` Public URL of the HYVOR instance. Users are redirected here for login, signup, and billing. `https://hyvor.com`   `HYVOR_PRIVATE_INSTANCE`  If the HYVOR instance is on a private network, set this to the private URL for internal communication.  `AUTH_HYVOR_URL`   `HYVOR_FAKE`  Whether to fake auth, billing, and component APIs. This is used in development.  `0` Auth
----

[](#auth)

This library provides authentication. Cloud uses HYVOR Auth API, while self-hosted applications can use OpenID Connect.

### User Data

[](#user-data)

The `AuthUser` class is used to represent the user. It has the following properties:

- `int $id` - the user ID
- `string $username` - the user's username (empty string for OIDC)
- `string $name` - the user's name
- `string $email` - the user's email
- `?string $picture_url` - the user's picture URL
- `?string $location` - the user's location
- `?string $bio` - the user's bio
- `?string $website_url` - the user's website URL

```
