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

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
CPX: The Composer Package Executor for PHP image

CPX: The Composer Package Executor for PHP

Read article
Laravel AI SDK Adds Human-in-the-Loop Tool Approval image

Laravel AI SDK Adds Human-in-the-Loop Tool Approval

Read article
Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals image

Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals

Read article
Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs image

Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs

Read article
Blade Formatting in Laravel Pint image

Blade Formatting in Laravel Pint

Read article
Inertia DevTools Is Now on the Chrome Web Store image

Inertia DevTools Is Now on the Chrome Web Store

Read article