Laravel Packages

Manage Invite Codes for Your Laravel Applications

Published
Manage Invite Codes for Your Laravel Applications image

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.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Sponsored

acquaintsoft logo
Acquaint Softtech

Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

Visit Acquaint Softtech

The latest

View all →
Laravel Image Responses: Serve Resized Images From Routes image

Laravel Image Responses: Serve Resized Images From Routes

Read article
Pause All Laravel Queues During a Deploy image

Pause All Laravel Queues During a Deploy

Read article
Laravel Terminal UI for the artisan dev Command image

Laravel Terminal UI for the artisan dev Command

Read article
Pause All Queues and a New artisan dev UI in Laravel 13.25 image

Pause All Queues and a New artisan dev UI in Laravel 13.25

Read article
Laravel monitoring that doesn't bill you by your traffic image

Laravel monitoring that doesn't bill you by your traffic

Read article
Mock PHP Classes in Tests With the Double Library image

Mock PHP Classes in Tests With the Double Library

Read article