This bundle help you to make a simple invitation system for your signup or other service. [http://bundles.laravel.com/bundle/Invi]
*** This Package is available for laravel 4 [https://github.com/sajjadrad/invi-l4] ***
- Generate invitation code with email.
- Set expiration date
- Active or deactive invite
- Use it,unsed it or delete it
add this to bundle.php:
'invi' => array('auto' => true),
Invi::forge()->generate("[email protected]","2 day",True); // Generate Invitation
if(Invi::forge()->check("f22c597305eb1800","[email protected]"))
Invi::forge()->used("f22c597305eb1800","[email protected]");
else
echo Invi::forge()->status("f22c597305eb1800","[email protected]");
generate an invitation code
- Arguments:
- expiration date : 2 year 2 month 13 day 1 hour 23 min 40 sec
- active
- Return:
- A jSon array of all invitation information
Invi::forge()->generate("[email protected]","2 day",True); // Generate Invitation
- Output:
{"code":"f22c5973ebbcca99","email":"[email protected]","expiration":"2013-05-10 15:58:41 ","active":true,"used":"0","created_at":"2013-05-06 15:58:41","updated_at":"2013-05-06 15:58:41"}
validate invitation code
- Argouments:
- invitation code
- Return:
- Boolean
Invi::forge()->check("f22c597305eb1800","[email protected]");
return invitation code status
- Argouments:
- invitation code
- Return:
- Status : Active,Deactive,Used,Valid,Not Exist
echo Invi::forge()->status("f22c597305eb1800","[email protected]");
activate an invitation
- Argouments:
- invitation code
Invi::forge()->active("f22c597305eb1800","[email protected]");
deactivate an invitation
- Argouments:
- invitation code
Invi::forge()->deactive("f22c597305eb1800","[email protected]");
make an invitation used
- Argouments:
- invitation code
Invi::forge()->used("f22c597305eb1800","[email protected]");
make an invitation unused
- Argouments:
- invitation code
Invi::forge()->unused("f22c597305eb1800","[email protected]");
delete an invitation
- Argouments:
- invitation code
Invi::forge()->delete("f22c597305eb1800","[email protected]");
The MIT License (MIT)
Copyright (c) 2013 Sajjad Rad
http://sajjadrad.com https://github.com/sajjadrad/laravel-Invi
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.