My Blog Posts

Laravel Invitation Code Package

Laravel Invitation Code Package


Laravel is a package that allows you to easily manage invitation codes for your application. Works by configuring a middleware software that valivers the invitation code before accessing a route:

Route::get('/protected-route', function() {
//
})->middleware('protected_by_invite_codes');

By limiting this API to a specific user account, you can create an invitation code using the following API:

use \Junges\InviteCodes\Facades\InviteCodes; $invite_code = InviteCodes::create()
-->maxUsages(10)
->restrictUsageTo('contato@mateusjunges.com')
->save();

You can learn more about this package, get all the setup instructions, and view the source code on GitHub at mateusjunges / laravel-invite-codes.



Share this article


Comments (0)

Comment