christhompsontldr/laravel-restricted
Laravel package to restrict access by route, IP, environment or custom rules. Adds simple middleware and configuration to block or allow requests with clear responses—useful for staging locks, admin-only areas, and temporary maintenance restrictions.
app/Http/Kernel.php.laravel/ui:^2|^3 (released in 2018–2019), which may conflict with modern Laravel (v10+) or newer UI packages.throttle, guest)?spatie/laravel-permission)?laravel/ui (may need to fork or replace with laravel/breeze).composer require christhompsontldr/laravel-restricted
php artisan vendor:publish.app/Http/Kernel.php:
protected $middleware = [
\ChrisThompsonTLDR\Restricted\Http\Middleware\RestrictedMode::class,
];
Route::middleware(['auth', 'restricted'])->group(function () {
// Only accessible in restricted mode
});
laravel/ui is outdated; may need vendor patching.| Scenario | Impact | Mitigation |
|---|---|---|
| Middleware conflict | Broken auth routes | Test in isolation; adjust priority. |
| Frontend misconfiguration | Inconsistent UI state | Implement clear restricted-mode cues. |
| Laravel version mismatch | Package fails to load | Fork and update dependencies. |
| No exit mechanism | Users stuck in restricted mode | Add manual override (e.g., admin panel). |
How can I help you explore Laravel packages today?