Manage Invite Codes for Your Laravel Applications

Manage Invite Codes for Your Laravel Applications

Laravel Invite Codes is a package by Mateus Junges that allows you to manage invite codes for your Laravel application easily. It works by configuring a middleware that validates an invite code before accessing a route:

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

You can generate an invite code using the following API, restricting this code to a specific user account:

use \Junges\InviteCodes\Facades\InviteCodes;

$invite_code = InviteCodes::create()
    ->expiresAt('2020-02-01')
    ->maxUsages(10)
    ->restrictUsageTo('contato@mateusjunges.com')
    ->save();

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

Filed in: News / packages
Laravel News Partners

Laravel Jobs

Senior Full-Time Laravel Developer (REMOTE)
Remote, ANYWHERE
Vue School
Senior Laravel Developer
Remote, USA & Canada Only
Givecloud
Backend Software Engineer
Remote, USA Only
CommentSold
Full Stack Laravel Developer (Full-time/Contract)
Remote or Columbus, OH
EduSourced
Backend PHP Developer
Hamburg
ABOUT YOU GmbH

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.