Download the PHP package junaidnasir/larainvite without Composer
On this page you can find all versions of the php package junaidnasir/larainvite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download junaidnasir/larainvite
More information about junaidnasir/larainvite
Files in junaidnasir/larainvite
Package larainvite
Short Description Laravel Invitation package, existing users can invite others by email
License MIT
Homepage https://github.com/junaidnasir/larainvite
Informations about the package larainvite
Larainvite
Larainvite is a Laravel package that allows existing users to invite others via email.
It generates a one-time invitation code that can be sent as an invite link, and keeps track of the invitation status.
- v7 supports Laravel 11
- v6 supports Laravel 10
- v5 supports Laravel 9
- v4 supports Laravel 8
- v3 supports Laravel 5.8+, Laravel 6.0 and Laravel 7.0
- v2 supports Laravel 5.0 to 5.8
- v1 supports Laravel 4.*
Installation
Begin by installing the package through Composer. Run the following command in your terminal:
add the package service provider in the providers array in config/app.php
:
you may add the facade access in the aliases array:
publish the migration and config file:
migrate to create user_invitation
table
edit your User
model to include larainviteTrait
Usage
You can use facade accessor to retrieve the package controller. Examples:
now create routes with refCode
, when user access that route you can use following methods
with help of new trait you have access to invitations sent by user
Events
larainvite fires several events
- Junaidnasir\Larainvite\Events\Invited
- Junaidnasir\Larainvite\Events\InvitationConsumed
- Junaidnasir\Larainvite\Events\InvitedCanceled
- Junaidnasir\Larainvite\Events\Expired
all of these events incloses invitation modal
so you can listen to these events.
include listener in EventServiceProvider.php
userInvite.php
Configurations
in config/larainvite.php
you can set default expiration time in hours from current time.
you can also change user model to be used, in larainvite.php
you can also change invitation model to be used, in larainvite.php
All versions of larainvite with dependencies
illuminate/support Version ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/database Version ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/events Version ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0