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

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
The Laracon Archive image

The Laracon Archive

Read article
Group Adjacent Collection Items in Laravel with chunkBy() image

Group Adjacent Collection Items in Laravel with chunkBy()

Read article
Laravel queue:work Now Prints Why the Worker Stopped image

Laravel queue:work Now Prints Why the Worker Stopped

Read article
Sidecar Brings Statamic's Control Panel to Your Existing Markdown Sites image

Sidecar Brings Statamic's Control Panel to Your Existing Markdown Sites

Read article
Collections chunkBy() and Storage Path Hardening in Laravel 13.30 image

Collections chunkBy() and Storage Path Hardening in Laravel 13.30

Read article
Forte: Parse and Rewrite Laravel Blade Templates image

Forte: Parse and Rewrite Laravel Blade Templates

Read article