Package Data | |
---|---|
Maintainer Username: | atbox |
Maintainer Contact: | info@atbox.io (Atbox) |
Package Create Date: | 2016-02-10 |
Package Last Update: | 2021-11-22 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-22 03:13:29 |
Package Statistics | |
---|---|
Total Downloads: | 1,264 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 34 |
Total Watchers: | 6 |
Total Forks: | 6 |
Total Open Issues: | 1 |
This package helps you to create a simple invitation system for your signup or other services. [https://packagist.org/packages/atbox/invi]
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
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");
Generate an invitation code
Invi::generate("example@domain.com", "2 day", true); // Generate Invitation
{"code":"f22c5973ebbcca99","email":"example@domain.com","expiration":"2013-05-10 15:58:41 ","active":true,"used":"0"}
Validate invitation code
Invi::check("f22c597305eb1800", "example@domain.com");
Return invitation code status
echo Invi::status("f22c597305eb1800", "example@domain.com");
Activate an invitation
Invi::active("f22c597305eb1800", "example@domain.com");
Deactivate an invitation
Invi::deactive("f22c597305eb1800", "example@domain.com");
Make an invitation used
Invi::used("f22c597305eb1800", "example@domain.com");
Make an invitation unused
Invi::unused("f22c597305eb1800", "example@domain.com");
Delete an invitation
Invi::delete("f22c597305eb1800", "example@domain.com");
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.
http://opensource.org/licenses/MIT