@extends('layouts.app') @section('title', 'Invite Codes') @section('content')

Invite Codes

Invitations to create an account. Bind one to an email so only that person can use it.

Registration: {{ str_replace('_', ' ', $mode) }}
@if($mode === 'closed')
Registration is closed, so these codes cannot currently be redeemed. Switch to invite only in Settings to let invitees sign up.
@endif @if(session('new_codes'))
New invitation{{ count(session('new_codes')) === 1 ? '' : 's' }} — copy the link now
@foreach(session('new_codes') as $new)
{{ $new['code'] }} @if($new['email']){{ $new['email'] }}@endif
@endforeach
@endif
{{-- ── Create ─────────────────────────────────────────────────────── --}}
Create invitation
@if($errors->any())
    @foreach($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif
@csrf
Recommended. The invitation is emailed straight to this address, and only it can redeem the code. Leave blank for a generic code you hand out yourself.
Forced to 1 when bound.
{{-- ── List ───────────────────────────────────────────────────────── --}}
@forelse($codes as $code) @empty @endforelse
Code Role Bound to Status Actions
{{ $code->code }}
{{ $code->created_at?->format('d M Y') }} @if($code->expires_at) · expires {{ $code->expires_at->format('d M Y') }} @endif
{{ str_replace('_', ' ', $code->role) }} @if($code->email) {{ $code->email }} @else anyone @endif @if($code->usedBy)
used by {{ $code->usedBy->name }}
@endif
@php $status = $code->status(); @endphp {{ ucfirst($status) }} @if($code->isRedeemable()) @if($code->email)
@csrf
@endif @endif @unless($code->isUsed())
@csrf @method('DELETE')
@endunless
No invite codes yet.
@if($codes->hasPages()) @endif
@push('scripts') @endpush @endsection