PHPackages                             atbox/invi - 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. atbox/invi

ActiveLibrary

atbox/invi
==========

A simple invitation system api for laravel 5

v2.0.0(9y ago)351.3k6[1 issues](https://github.com/Atbox/invi-l5/issues)MITPHPPHP &gt;=5.3.0

Since Jan 31Pushed 4y ago4 watchersCompare

[ Source](https://github.com/Atbox/invi-l5)[ Packagist](https://packagist.org/packages/atbox/invi)[ RSS](/packages/atbox-invi/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

[![Packagist](https://camo.githubusercontent.com/a9cf2e3ca37282513e051127d83d4b5226fb01998bc538368c207f645654a77e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6174626f782f696e76692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/atbox/invi)[![Packagist](https://camo.githubusercontent.com/dd7948258d284ea2a79d1e9ab53e1b5b192113fa9fdcf84225f1908640a68691/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6174626f782f696e76692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/atbox/invi)

Invi Package for Laravel 5
==========================

[](#invi-package-for-laravel-5)

This package helps you to create a simple invitation system for your signup or other services. \[\]

Features
--------

[](#features)

- Generate an invitation code for a given email
- Set an expiration date on invites
- Activate or deactivate invites
- Use, unuse or delete invites

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

[](#installation)

Laravel 5.4:

```
composer require atbox/invi ^2.0

```

Laravel 5.0 up to 5.3:

```
composer require atbox/invi ^1.0

```

Execute:

```
composer update

```

Add this to config/app.php end of providers array:

```
Atbox\Invi\InviServiceProvider::class,
```

Add this to config/app.php end of aliases array:

```
'Invi' => Atbox\Invi\Facades\Invi::class,
```

Publish the migration file:

```
php artisan vendor:publish
```

Run the migration command:

```
php artisan migrate
```

Example
-------

[](#example)

```
Invi::generate("example@domain.com", "2 day", true); // Generate Invitation

if(Invi::check("f22c597305eb1800", "example@domain.com"))
    Invi::used("f22c597305eb1800", "example@domain.com");
else
    echo Invi::status("f22c597305eb1800", "example@domain.com");
```

Functions
---------

[](#functions)

### generate

[](#generate)

Generate an invitation code

- Arguments:
    - email
    - expiration date, accepts timespans like: 2 years | 2 months | 13 days | 1 hour | 23 min | 40 sec
    - active
- Returns:
    - a JSON array of all invitation information

```
Invi::generate("example@domain.com", "2 day", true); // Generate Invitation
```

- Output:

```
{"code":"f22c5973ebbcca99","email":"example@domain.com","expiration":"2013-05-10 15:58:41 ","active":true,"used":"0"}
```

### check

[](#check)

Validate invitation code

- Arguments:
    - invitation code
    - email
- Returns:
    - boolean

```
Invi::check("f22c597305eb1800", "example@domain.com");
```

### status

[](#status)

Return invitation code status

- Arguments:
    - invitation code
    - email
- Returns:
    - status: Active, Deactive, Used, Valid, Not Exist

```
echo Invi::status("f22c597305eb1800", "example@domain.com");
```

### active

[](#active)

Activate an invitation

- Arguments:
    - invitation code
    - email

```
Invi::active("f22c597305eb1800", "example@domain.com");
```

### deactive

[](#deactive)

Deactivate an invitation

- Arguments:
    - invitation code
    - email

```
Invi::deactive("f22c597305eb1800", "example@domain.com");
```

### used

[](#used)

Make an invitation used

- Arguments:
    - invitation code
    - email

```
Invi::used("f22c597305eb1800", "example@domain.com");
```

### unused

[](#unused)

Make an invitation unused

- Arguments:
    - invitation code
    - email

```
Invi::unused("f22c597305eb1800", "example@domain.com");
```

### delete

[](#delete)

Delete an invitation

- Arguments:
    - invitation code
    - email

```
Invi::delete("f22c597305eb1800", "example@domain.com");
```

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2016 Atbox

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~0 days

Total

3

Last Release

3391d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/33f65a75bd069fd4abb4e1b92fa2574b4cfcd7e45b787d6ce610f1ec4fb3d6a5?d=identicon)[atbox](/maintainers/atbox)

---

Top Contributors

[![sajjadrad](https://avatars.githubusercontent.com/u/1608837?v=4)](https://github.com/sajjadrad "sajjadrad (6 commits)")[![thesoulless](https://avatars.githubusercontent.com/u/1730786?v=4)](https://github.com/thesoulless "thesoulless (5 commits)")[![orbex](https://avatars.githubusercontent.com/u/2074126?v=4)](https://github.com/orbex "orbex (1 commits)")

---

Tags

invitationlaravellaravel-5-packagelaravelInviteInvitation

### Embed Badge

![Health badge](/badges/atbox-invi/health.svg)

```
[![Health](https://phpackages.com/badges/atbox-invi/health.svg)](https://phpackages.com/packages/atbox-invi)
```

###  Alternatives

[junaidnasir/larainvite

Laravel Invitation package, existing users can invite others by email

142119.9k](/packages/junaidnasir-larainvite)[offload-project/laravel-invite-only

A Laravel package for managing user invitations with polymorphic relationships, token-based access, scheduled reminders, and event-driven notifications.

694.4k1](/packages/offload-project-laravel-invite-only)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[glhd/linen

21135.6k](/packages/glhd-linen)

PHPackages © 2026

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