Download the PHP package atbox/invi without Composer
On this page you can find all versions of the php package atbox/invi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package invi
Short Description A simple invitation system api for laravel 5
License MIT
Informations about the package invi
Invi Package for Laravel 5
This package helps you to create a simple invitation system for your signup or other services. [https://packagist.org/packages/atbox/invi]
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
Laravel 5.4:
Laravel 5.0 up to 5.3:
Execute:
Add this to config/app.php end of providers array:
Add this to config/app.php end of aliases array:
Publish the migration file:
Run the migration command:
Example
Functions
generate
Generate an invitation code
- Arguments:
- 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
- Output:
check
Validate invitation code
- Arguments:
- invitation code
- Returns:
- boolean
status
Return invitation code status
- Arguments:
- invitation code
- Returns:
- status: Active, Deactive, Used, Valid, Not Exist
active
Activate an invitation
- Arguments:
- invitation code
deactive
Deactivate an invitation
- Arguments:
- invitation code
used
Make an invitation used
- Arguments:
- invitation code
unused
Make an invitation unused
- Arguments:
- invitation code
delete
Delete an invitation
- Arguments:
- invitation code
License
The MIT License (MIT)
Copyright (c) 2016 Atbox
http://atbox.io https://github.com/atbox/invi-l5
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.