This is where your description should go. Take a look at contributing.md to see a to do list.
Via Composer
$ composer require muarachmann/laravel-invitations
After installing the laravel Invite Codes package, register the service provider in your config/app.php
file:
Optional in Laravel 5.5 or above
'providers' => [
MuaRachmann\Invitations\InvitationServiceProvider::class,
MuaRachmann\Invitations\InvitationEventServiceProvider::class,
];
You can publish the config file with: This is the contents of the file that will be published at config/laravel-invitations.php:
php artisan vendor:publish --provider="MuaRachmann\Invitations\InvitationServiceProvider" --tag="laravel-invitations-config"
Run migrations required for this package. If you need to customize the tables, you can configure them with:
php artisan vendor:publish --provider="MuaRachmann\Invitations\InvitationServiceProvider" --tag="laravel-invitations-migrations"
Laravel Invitations comes with several events events by default
- MuaRachmann\Invitations\Events\InvitationAccepted
- MuaRachmann\Invitations\Events\InvitationDeclined
- MuaRachmann\Invitations\Events\InvitationExpired
- MuaRachmann\Invitations\Events\InvitationSent
These events have the invitation
model so you can listen to these events and take approriate actions e.g send welcome email.
include listener in EventServiceProvider.php
use MuaRachmann\Invitations\Events\InvitationAccepted;
use App\Listeners\SendWelcomeEmail;
protected $listen = [
InvitationAccepted::class => [
SendWelcomeEmail::class,
],
];
SendWelcomeEmail.php
public function handle($invitation)
{
// send welcome email to user
}
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email muarachmann@gmail.com instead of using the issue tracker.
MIT. Please see the license file for more information.