PHPackages                             protik/laravel-theme-switcher - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. protik/laravel-theme-switcher

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

protik/laravel-theme-switcher
=============================

A Laravel package to switch website themes (light/dark mode)

v1.0.1(4mo ago)02MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Dec 18Pushed 4mo agoCompare

[ Source](https://github.com/ProtikAcharjay/laravel-theme-switcher)[ Packagist](https://packagist.org/packages/protik/laravel-theme-switcher)[ RSS](/packages/protik-laravel-theme-switcher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel Theme Switcher
======================

[](#laravel-theme-switcher)

A simple, plug-and-play Laravel package for switching between multiple themes with zero configuration required.

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

[](#installation)

```
composer require protik/laravel-theme-switcher
```

Quick Setup
-----------

[](#quick-setup)

### Step 1: Add Middleware

[](#step-1-add-middleware)

In `bootstrap/app.php`, add the middleware to the `web` group:

```
->withMiddleware(function (Middleware $middleware): void {
    $middleware->web(append: [
        \Protik\ThemeSwitcher\Middleware\ApplyTheme::class,
    ]);
})
```

### Step 2: Use in Your Views

[](#step-2-use-in-your-views)

Add the theme class to your `` tag and include the toggle component:

```

```

**That's it!** The package automatically injects default styles and provides theme switching functionality.

Features
--------

[](#features)

- ✅ Multiple themes support (light, dark, blue, etc.)
- ✅ Zero configuration required
- ✅ Auto-injected CSS styles
- ✅ Session-based theme storage
- ✅ Blade component for easy integration
- ✅ Fully customizable via config

Customization (Optional)
------------------------

[](#customization-optional)

Publish the config file to customize themes:

```
php artisan vendor:publish --tag=config --provider="Protik\ThemeSwitcher\ThemeSwitcherServiceProvider"
```

Edit `config/theme-switcher.php` to:

- Add/modify themes
- Change default theme
- Disable default styles

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

[](#requirements)

- PHP ^8.1
- Laravel ^12.0

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance79

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

140d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.1PHP ^8.0|^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/67c6c897fcc0343d0b27f7d19853eac4f4c1b5ffea4109c33a2ed2f9ac4b7b3c?d=identicon)[ProtikAcharjay](/maintainers/ProtikAcharjay)

---

Top Contributors

[![ProtikAcharjay](https://avatars.githubusercontent.com/u/82051598?v=4)](https://github.com/ProtikAcharjay "ProtikAcharjay (3 commits)")

### Embed Badge

![Health badge](/badges/protik-laravel-theme-switcher/health.svg)

```
[![Health](https://phpackages.com/badges/protik-laravel-theme-switcher/health.svg)](https://phpackages.com/packages/protik-laravel-theme-switcher)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M858](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
