PHPackages                             kylerusby/laravel-waitlist - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. kylerusby/laravel-waitlist

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

kylerusby/laravel-waitlist
==========================

A package for laravel to allow users to sign up to a waitlist.

1.0(7mo ago)051[4 PRs](https://github.com/kylerusby/laravel-waitlist/pulls)MITPHPPHP ^8.4CI passing

Since Oct 13Pushed 1mo agoCompare

[ Source](https://github.com/kylerusby/laravel-waitlist)[ Packagist](https://packagist.org/packages/kylerusby/laravel-waitlist)[ Docs](https://github.com/kylerusby/laravel-waitlist)[ GitHub Sponsors]()[ RSS](/packages/kylerusby-laravel-waitlist/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (6)Used By (0)

Laravel Waitlist
================

[](#laravel-waitlist)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4f4557b3a4f477e05b8ebfd2cce7ec4e44f4785b11d4189b4799f14c3ccea43a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b796c6572757362792f6c61726176656c2d776169746c6973742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kylerusby/laravel-waitlist)[![GitHub Tests Action Status](https://camo.githubusercontent.com/2b4c3d2cfd87788b9ad3f0aa246c55fd44e4527e95f2f6e33cd7aca91c33d826/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b796c6572757362792f6c61726176656c2d776169746c6973742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/kylerusby/laravel-waitlist/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/43d2e646d1a2bdaa1554c71587104949fee7a7082f71c9453a875bcf545b525c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b796c6572757362792f6c61726176656c2d776169746c6973742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/kylerusby/laravel-waitlist/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/246858ce5b99f67943175c4b01214752dee6b2d94dfdcd00ba448ee86a21dcc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b796c6572757362792f6c61726176656c2d776169746c6973742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kylerusby/laravel-waitlist)

A beautiful, ready-to-use Laravel package for managing waitlists. Collect email addresses from interested users with a stunning, pre-built landing page styled with Tailwind CSS. Perfect for product launches, beta releases, or any project that needs to build anticipation.

Requirements
------------

[](#requirements)

- PHP 8.4 or higher
- Laravel 11.x or 12.x

Features
--------

[](#features)

- 🎨 **Beautiful Pre-built UI** - Modern, responsive waitlist page with Tailwind CSS
- 📧 **Email Collection** - Simple form with validation and unique email constraint
- ⚙️ **Highly Configurable** - Customize text, colors, and behavior via config
- 🛣️ **Flexible Routing** - Enable/disable routes or override paths and middleware
- 🎯 **Easy Integration** - Works out of the box with zero configuration
- 🔒 **Form Validation** - Built-in request validation with custom error messages
- 🎭 **Customizable Views** - Publish and modify the Blade template to match your brand

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require kylerusby/laravel-waitlist
```

### Local Development

[](#local-development)

To use this package locally in your Laravel project:

1. Add the path repository to your project's `composer.json`:

```
{
    "repositories": [
        {
            "type": "path",
            "url": "/path/to/laravel-waitlist",
            "options": {
                "symlink": true
            }
        }
    ]
}
```

2. Require the package:

```
composer require kylerusby/laravel-waitlist @dev
```

### Publish and Run Migrations

[](#publish-and-run-migrations)

```
php artisan vendor:publish --tag="waitlist-migrations"
php artisan migrate
```

### Publish Configuration (Optional)

[](#publish-configuration-optional)

```
php artisan vendor:publish --tag="waitlist-config"
```

### Publish Views (Optional)

[](#publish-views-optional)

```
php artisan vendor:publish --tag="waitlist-views"
```

Usage
-----

[](#usage)

Once installed, the package works immediately with zero configuration!

### Quick Start

[](#quick-start)

Visit `/waitlist` in your Laravel application to see the pre-built waitlist page. Users can enter their email addresses, and they'll be saved to the database.

### Accessing Waitlist Data

[](#accessing-waitlist-data)

```
use KyleRusby\LaravelWaitlist\Models\Waitlist;

// Get all waitlist entries
$entries = Waitlist::all();

// Get recent entries
$recent = Waitlist::latest()->take(10)->get();

// Export emails
$emails = Waitlist::pluck('email')->toArray();

// Count total signups
$count = Waitlist::count();
```

### Named Routes

[](#named-routes)

The package registers named routes that you can use in your application:

```
// Generate URLs
route('waitlist.index')  // GET /waitlist
route('waitlist.store')  // POST /waitlist

// In Blade templates
Join Waitlist

// In redirects
return redirect()->route('waitlist.index');
```

### Custom Controller Usage

[](#custom-controller-usage)

If you disable the default routes, you can use the controller in your own routes:

```
use KyleRusby\LaravelWaitlist\Http\Controllers\WaitlistController;

Route::get('/join-us', [WaitlistController::class, 'index'])->name('waitlist.index');
Route::post('/join-us', [WaitlistController::class, 'store'])->name('waitlist.store');
```

Configuration
-------------

[](#configuration)

After publishing the config file, you'll find it at `config/waitlist.php`. Here are the available options:

### Enable/Disable Waitlist

[](#enabledisable-waitlist)

Control whether the waitlist functionality is enabled:

```
// .env
WAITLIST_ENABLED=true

// Or in config/waitlist.php
'enabled' => env('WAITLIST_ENABLED', true),
```

### Route Configuration

[](#route-configuration)

Customize the routes or disable them entirely:

```
'routes' => [
    'enabled' => true,              // Enable/disable package routes
    'prefix' => '',                 // Add a prefix (e.g., 'early-access')
    'middleware' => ['web'],        // Apply middleware
    'paths' => [
        'index' => '/waitlist',     // GET route path
        'store' => '/waitlist',     // POST route path
    ],
],
```

**Examples:**

Disable routes to use your own:

```
'routes' => [
    'enabled' => false,
],
```

Add a prefix and custom path:

```
'routes' => [
    'prefix' => 'early-access',
    'paths' => [
        'index' => '/join',
        'store' => '/join',
    ],
],
// Routes will be: /early-access/join
```

Apply guest middleware:

```
'routes' => [
    'middleware' => ['web', 'guest'],
],
```

### Page Content

[](#page-content)

Customize the waitlist page text and appearance:

```
'headline' => 'Be the First to Experience Something Amazing',
'subheadline' => 'Join our exclusive waitlist and get early access when we launch.',
'badge_text' => 'Limited Early Access',
'button_text' => 'Join Waitlist',
'success_message' => 'Thank you for joining! We\'ll be in touch soon.',
'member_count' => 1234,  // Displayed as social proof
```

**Note:** The success message is displayed in the view template. The controller returns "Added to waitlist!" as a flash message. To customize both, publish the views and modify the template.

### Form Validation

[](#form-validation)

The package includes built-in form validation with custom error messages:

```
// Validation rules
'email' => [
    'required',
    'email',
    'unique:waitlist,email',
]

// Custom error messages
'email.required' => 'Please provide an email address.'
'email.email' => 'Please provide a valid email address.'
'email.unique' => 'This email is already on the waitlist.'
```

### Complete Configuration Example

[](#complete-configuration-example)

```
